protocol-builder-mock/docker_run.sh

22 lines
457 B
Bash
Raw Normal View History

2020-02-17 16:47:34 -05:00
#!/bin/bash
# run migrations
export FLASK_APP=./app.py
if [ "$DOWNGRADE_DB" = "true" ]; then
echo 'Downgrading database...'
pipenv run flask db downgrade
fi
if [ "$UPGRADE_DB" = "true" ]; then
echo 'Upgrading database...'
pipenv run flask db upgrade
fi
if [ "$RESET_DB" = "true" ]; then
echo 'Resetting database...'
pipenv run flask load-example-data
fi
2020-05-24 23:05:57 -04:00
pipenv run gunicorn -e SCRIPT_NAME="$APPLICATION_ROOT" --bind 0.0.0.0:$PORT0 wsgi:app