Created
February 1, 2020 01:49
docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3 | |
WORKDIR /usr/src/app | |
COPY . . | |
RUN pip install flask waitress | |
EXPOSE 8080 | |
CMD ["python", "./app.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def index(): | |
return "Hello, Python" | |
from waitress import serve | |
serve(app, port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment