Skeleton of a flask-based python app
Run using the development server, with:
$ python wsgi.py
Or with gunicorn:
$ gunicorn --bind='0.0.0.0:5000' wsgi:app
Install and setup your docker environment.
Build the docker image with:
$ docker build -f deploy/Dockerfile -t server:latest .
And run with:
$ docker run -p 5000:5000 \
--network=host \
-e FLASK_APP=app \
-e FLASK_DEBUG=0 \
-e FLASK_ENV=<<ENVIRONMENT>> \
-e SQLALCHEMY_DATABASE_URI=<<DATABASE_URI>> \
-e SECRET_KEY=<<SECRET_KEY>> \
server:latest