initial commit
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal 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
11
app.py
Normal 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
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Flask==3.0.0
|
||||||
13
templates/index.html
Normal file
13
templates/index.html
Normal 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>
|
||||||
Reference in New Issue
Block a user