Skip to content

Commit d052e64

Browse files
authored
Add files via upload
1 parent fb93a63 commit d052e64

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

Flask_docker_app/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.8
2+
RUN mkdir /app
3+
WORKDIR /app
4+
ADD requirements.txt /app
5+
ADD app_main.py /app
6+
RUN pip3 install -r requirements.txt
7+
CMD python3 app_main.py

Flask_docker_app/app_main.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from flask import Flask
2+
from waitress import serve
3+
app = Flask(__name__)
4+
5+
@app.route('/')
6+
def hello_world():
7+
return 'This is a Python Flask Application for Test'
8+
9+
if __name__ == '__main__':
10+
serve(app, host="0.0.0.0", port=7779)

Flask_docker_app/requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Flask == 2.2.2
2+
waitress==1.4.4
3+
Werkzeug==2.2.2

0 commit comments

Comments
 (0)