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

migrations do nothing when there's nothing to do and this allows easier version upgrades
pipelines/22413
JuniorJPDJ 2022-07-16 20:18:06 +02:00
rodzic aad853f6b0
commit 7e7cd25fa3
2 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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-}

Wyświetl plik

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