]>
Commit | Line | Data |
---|---|---|
e33ca444 | 1 | #!/usr/bin/env bash |
dab2d564 JG |
2 | |
3 | set -e | |
4 | ||
e05edbf9 | 5 | source env/bin/activate |
f7e729bb JG |
6 | |
7 | # Make a backup of the database | |
57738c9a | 8 | pg_dump -Fc AA > ROOT/postgresql.db.backup_$(date '+%Y-%m-%d_%H-%M-%S').dump |
fb05f581 | 9 | |
f7e729bb JG |
10 | |
11 | # Get newest released version | |
eb8ccddb | 12 | git checkout main |
f7e729bb JG |
13 | git pull |
14 | ||
4d39ff7a | 15 | # Install exactly all needed dependencies |
e05edbf9 | 16 | pip install --upgrade -r requirements.txt |
d67ff54e | 17 | |
f7e729bb | 18 | # Make sure all database migrations are applied |
e05edbf9 | 19 | python ROOT/manage.py migrate |
f7e729bb | 20 | |
163c63a7 | 21 | # Make sure all static files are in place |
e05edbf9 | 22 | python ROOT/manage.py collectstatic --noinput |
163c63a7 | 23 | |
f0338b7d JG |
24 | # Test if gpg is working in a subshell |
25 | (cd ROOT && python -Wall manage.py test members.test_gpg.GpgTestCase) | |
26 | ||
f7e729bb | 27 | # Start webserver |
e05edbf9 | 28 | gunicorn ROOT.wsgi --timeout 3000 --chdir ROOT/ --bind :8000 |