add flask sample
Signed-off-by: kouul <maulloohans@gmail.com>
This commit is contained in:
parent
56b4dc0cf9
commit
83a24f681f
5 changed files with 78 additions and 0 deletions
6
flask/app/Dockerfile
Normal file
6
flask/app/Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM python:3.7-alpine
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN pip3 install -r requirements.txt
|
||||
ENTRYPOINT ["python3"]
|
||||
CMD ["app.py"]
|
||||
9
flask/app/app.py
Normal file
9
flask/app/app.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello():
|
||||
return "Hello World!"
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0')
|
||||
1
flask/app/requirements.txt
Normal file
1
flask/app/requirements.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
flask
|
||||
Loading…
Add table
Add a link
Reference in a new issue