Compare commits
2 Commits
b723bb1285
...
b6abfcfc67
| Author | SHA1 | Date | |
|---|---|---|---|
| b6abfcfc67 | |||
| bc3df4ce1a |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@ __pycache__/
|
|||||||
*.so
|
*.so
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
|
postgres_data
|
||||||
|
|
||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
.Python
|
.Python
|
||||||
|
|||||||
4
app.py
4
app.py
@@ -1,11 +1,11 @@
|
|||||||
from flask import Flask
|
from flask import Flask, render_template, request
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello_world(): # put application's code here
|
def hello_world(): # put application's code here
|
||||||
return 'Hello World!'
|
return render_template("index.html")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -12,3 +12,23 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- FLASK_APP=app.py
|
- FLASK_APP=app.py
|
||||||
- FLASK_ENV=development
|
- FLASK_ENV=development
|
||||||
|
- DATABASE_URL=postgresql://flaskuser:flaskpass@db:5432/flaskdb
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:15
|
||||||
|
container_name: postgres_db
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=flaskuser
|
||||||
|
- POSTGRES_PASSWORD=flaskpass
|
||||||
|
- POSTGRES_DB=flaskdb
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
|||||||
0
static/css/style.css
Normal file
0
static/css/style.css
Normal file
0
static/js/main.js
Normal file
0
static/js/main.js
Normal file
19
templates/base.html
Normal file
19
templates/base.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<html lang="de">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/css/style.css">
|
||||||
|
<meta charstet="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<title> {% block title %} {% endblock %} </title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1> Herzlich Willkommen auf der Website der BI23b! </h1>
|
||||||
|
<p> Zurücklehnen und genießen... </p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
5
templates/index.html
Normal file
5
templates/index.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
HURENSOHN
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user