Skip to content

Commit

Permalink
Migrate as part of deploy
Browse files Browse the repository at this point in the history
Migrations as part of deploys were dropped by the changes in:
b8c57f5
This puts just the migration back.
  • Loading branch information
GeoWill committed Nov 19, 2024
1 parent eee9fbd commit 83e8cd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ hooks:
- location: deployscripts/write_envfile.sh
timeout: 300
runas: root
- location: serverscripts/migrate.sh
timeout: 300
runas: every_election
- location: deployscripts/install_crontab.sh
timeout: 900
runas: root
Expand Down
6 changes: 6 additions & 0 deletions serverscripts/migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -euxo pipefail

cd /var/www/every_election/repo/
source .venv/bin/activate
python manage.py migrate --noinput

0 comments on commit 83e8cd4

Please sign in to comment.