feat(api/Docker): automatically run migrations on container start

migrations do nothing when there's nothing to do and this allows easier version upgrades
This commit is contained in:
JuniorJPDJ 2022-07-16 20:18:06 +02:00
parent aad853f6b0
commit 7e7cd25fa3
2 changed files with 2 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash -eux
python /app/manage.py collectstatic --noinput
python /app/manage.py migrate
gunicorn config.asgi:application -w ${FUNKWHALE_WEB_WORKERS-1} -k uvicorn.workers.UvicornWorker -b 0.0.0.0:5000 ${GUNICORN_ARGS-}

View File

@ -0,0 +1 @@
Apply migrations on API container start (!1879)