diff options
author | 2019-07-03 15:04:02 +0200 | |
---|---|---|
committer | 2019-07-03 15:04:02 +0200 | |
commit | 793249576d26ab448d6f55497a6bef05c8e27ede (patch) | |
tree | bf04424e9b3044ccf9697e1bbead2d6e3489ee12 /docker/app/scripts/migrate.sh | |
parent | Adding django.pythondiscord.com to ALLOWED_HOSTS (diff) |
Setting up a method for automatically applying migrations in production. Making a separate Dockerfile for local docker-compose builds.
Diffstat (limited to 'docker/app/scripts/migrate.sh')
-rwxr-xr-x | docker/app/scripts/migrate.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docker/app/scripts/migrate.sh b/docker/app/scripts/migrate.sh new file mode 100755 index 00000000..94b5f7c4 --- /dev/null +++ b/docker/app/scripts/migrate.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +echo --- Applying migrations --- +python manage.py migrate --verbosity 1 + +echo --- Collecting static files --- +python manage.py collectstatic --no-input --clear --verbosity 0 + +echo --- Starting uwsgi --- +exec "$@" # This runs the CMD at the end of the Dockerfile |