mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Move manifest command to run script, add collectstatic
This commit is contained in:
parent
65bb21ff0f
commit
96d191b725
2 changed files with 21 additions and 2 deletions
19
src/run.sh
Executable file
19
src/run.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
# Only run migrations on the zeroth index when in a cloud.gov environment
|
||||
if [[ -v CF_INSTANCE_INDEX && $CF_INSTANCE_INDEX == 0 ]]
|
||||
then
|
||||
python manage.py migrate --settings=registrar.config.settings --noinput
|
||||
else
|
||||
echo "Migrations did not run."
|
||||
if [[ -v CF_INSTANCE_INDEX ]]
|
||||
then
|
||||
echo "CF Instance Index is ${CF_INSTANCE_INDEX}."
|
||||
fi
|
||||
fi
|
||||
|
||||
python manage.py collectstatic --settings=registrar.config.settings --noinput
|
||||
gunicorn registrar.config.wsgi -t 60
|
Loading…
Add table
Add a link
Reference in a new issue