2024-02-23 15:35:55 +11:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-03-20 14:18:59 +11:00
|
|
|
set -e # Abort on failure
|
|
|
|
|
2024-02-27 09:43:07 +11:00
|
|
|
git push
|
2024-02-23 15:35:55 +11:00
|
|
|
ssh debian@hickory.sfconservancy.org 'bash -s' << EOF
|
|
|
|
set -x # Show output
|
2024-10-22 16:10:07 +11:00
|
|
|
set -e # Abort on errors
|
|
|
|
|
2024-02-23 15:35:55 +11:00
|
|
|
cd /var/www/website
|
|
|
|
sudo -u www-data git pull
|
2024-05-07 09:48:36 +10:00
|
|
|
sudo chown www-data:www-data .
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 -m pip install -r requirements.txt
|
2024-03-20 14:18:46 +11:00
|
|
|
export DJANGO_SETTINGS_MODULE=conservancy.settings.prod
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py check
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py migrate
|
|
|
|
sudo -E -u www-data /var/www/venv-website/bin/python3 manage.py collectstatic -v0 --noinput --link
|
2024-03-16 09:07:11 +11:00
|
|
|
sudo systemctl reload apache2
|
2024-02-23 15:35:55 +11:00
|
|
|
curl --silent --head https://sfconservancy.org | grep --perl-regexp "^HTTP/.+ 200"
|
|
|
|
EOF
|