Update bin/deploy to use production settings

This commit is contained in:
Ben Sturmfels 2024-03-20 14:18:46 +11:00
parent fedab3120b
commit e93f864e0e
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -6,9 +6,10 @@ set -x # Show output
set -e # Abort on failure
cd /var/www/website
sudo -u www-data git pull
sudo -u www-data /var/www/venv-website/bin/python3 manage.py check
sudo -u www-data /var/www/venv-website/bin/python3 manage.py migrate
sudo -u www-data /var/www/venv-website/bin/python3 manage.py collectstatic -v0 --noinput --link
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
sudo systemctl reload apache2
curl --silent --head https://sfconservancy.org | grep --perl-regexp "^HTTP/.+ 200"
EOF