feat(docker): perform migrations when starting the fastapi service

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-06 22:11:03 -08:00
parent b5ff8581f3
commit a6faf9bd2e
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -23,6 +23,9 @@ export FASTAPI_BACKEND="$1"
echo "FASTAPI_BACKEND: $FASTAPI_BACKEND"
echo "FASTAPI_WORKERS: $FASTAPI_WORKERS"
# Perform migrations.
alembic upgrade head
if [ "$1" == "uvicorn" ] || [ "$1" == "" ]; then
exec uvicorn --reload \
--ssl-certfile "$CERT" \