Created
February 1, 2020 01:49
-
-
Save hyperupcall/5414b22a3bcd9e1d842929097eceb26e to your computer and use it in GitHub Desktop.
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