mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 23:32:27 -05:00
Run migrations on the first web instance startup
This commit is contained in:
@@ -21,7 +21,7 @@ applications:
|
||||
- type: web
|
||||
instances: ((web_instances))
|
||||
memory: ((web_memory))
|
||||
command: ./scripts/run_app_paas.sh gunicorn -c ./gunicorn_config.py application
|
||||
command: ./scripts/migrate_and_run_web.sh
|
||||
- type: worker
|
||||
instances: ((worker_instances))
|
||||
memory: ((worker_memory))
|
||||
|
||||
7
scripts/migrate_and_run_web.sh
Executable file
7
scripts/migrate_and_run_web.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $CF_INSTANCE_INDEX -eq 0 ]]; then
|
||||
flask db upgrade
|
||||
fi
|
||||
|
||||
${HOME}/scripts/run_app_paas.sh gunicorn -c ${HOME}/gunicorn_config.py application
|
||||
Reference in New Issue
Block a user