Skip to content

Instantly share code, notes, and snippets.

@moshfiqur
Created May 20, 2019 21:27
Show Gist options
  • Save moshfiqur/772d847650f319bd6167b9a67660021a to your computer and use it in GitHub Desktop.
Save moshfiqur/772d847650f319bd6167b9a67660021a to your computer and use it in GitHub Desktop.
Docker entrypoint script for Demo Flask App deployed on Google App Engine
#!/bin/bash
# perform the data migration
flask db migrate
flask db upgrade
if [ "$FLASK_ENV" == "development" ]; then
flask run --host=0.0.0.0 --port=8080
else
gunicorn --bind=0.0.0.0:8080 run:app
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment