commit df15c04395f5d5a2191dc5b0faa40a286cf1d966 Author: patha Date: Fri Jan 12 11:55:01 2024 +0100 initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40665bc --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/app.py b/app.py new file mode 100644 index 0000000..e1c384b --- /dev/null +++ b/app.py @@ -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() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c204bef --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask==3.0.0 \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..3bc4981 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,13 @@ + + + Homepage + + +

Homepage

+ {% for x in range(content) %} +

{{x}}

+ {% endfor %} +

{{x}}

+ + + \ No newline at end of file