Public Repository

Last pushed: 6 months ago
Short Description
Flask demo application
Full Description

Dockerfile

FROM python:2.7
EXPOSE 9000
COPY requirements.txt /
COPY main.py /
RUN ["pip", "install", "-r", "requirements.txt"]
CMD ["uwsgi", "--socket", "0.0.0.0:9000", "--protocol", "http", "-w", "main:app"]

main.py

from flask import Flask, jsonify

app = Flask(__name__)

@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def catch_all(path):
    return jsonify('It works!')


if __name__ == '__main__':
    app.run(port=9000)
Docker Pull Command
Owner
lzac