-
-
Save ToshY/4d02f34d184e24d7b05ef600f593da2c to your computer and use it in GitHub Desktop.
Sample Flask App - Ping Service
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 pong_service(): | |
return 'Hello, I am pong service!' | |
@app.route('/pong') | |
def do_pong(): | |
return 'Pong' | |
if __name__ == "__main__": | |
app.run(host ='0.0.0.0', port = 5001, debug = True) |
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.8-slim-buster | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT [ "python" ] | |
CMD [ "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
Flask==0.12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment