Run migrations on container start

This commit is contained in:
Jake Howard 2022-08-30 09:13:43 +01:00
parent ad894a30a1
commit ca835a33b4
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -44,7 +44,7 @@ COPY --chown=website ./website ./website
RUN SECRET_KEY=none python manage.py collectstatic --noinput --clear -v3
CMD gunicorn -c etc/gunicorn.conf.py
CMD python manage.py migrate --noinput && gunicorn -c etc/gunicorn.conf.py
# Just dev stuff
FROM production as dev