initial commit

This commit is contained in:
2024-01-12 11:55:01 +01:00
commit df15c04395
4 changed files with 34 additions and 0 deletions

9
Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM ubuntu:22.04.03
RUN apt-get update -y && apt-get install -y python python-pip
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
COPY ./templates /app/templates
RUN pip install -r requirements.txt
COPY . /app
CMD [ "python","./app.py" ]

11
app.py Normal file
View File

@@ -0,0 +1,11 @@
from flask import Flask, redirect, url_for, render_template
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html', content=5)
if __name__ == '__main__':
app.run()

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
Flask==3.0.0

13
templates/index.html Normal file
View File

@@ -0,0 +1,13 @@
<html>
<head>
<title>Homepage</title>
</head>
<body>
<h1>Homepage</h1>
{% for x in range(content) %}
<p>{{x}}</p>
{% endfor %}
<p>{{x}}<p>
</body>
</html>