mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +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
|
@ -8,7 +8,7 @@ applications:
|
||||||
memory: 512M
|
memory: 512M
|
||||||
stack: cflinuxfs3
|
stack: cflinuxfs3
|
||||||
timeout: 180
|
timeout: 180
|
||||||
command: gunicorn registrar.config.wsgi -t 60
|
command: ./run.sh
|
||||||
health-check-type: http
|
health-check-type: http
|
||||||
health-check-http-endpoint: /health
|
health-check-http-endpoint: /health
|
||||||
env:
|
env:
|
||||||
|
@ -20,4 +20,4 @@ applications:
|
||||||
- route: getgov-unstable.app.cloud.gov
|
- route: getgov-unstable.app.cloud.gov
|
||||||
services:
|
services:
|
||||||
- getgov-credentials
|
- getgov-credentials
|
||||||
- getgov-database
|
- getgov-unstable-database
|
||||||
|
|
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