Files @ 94c56bb468cb
Branch filter:

Location: website/bin/deploy.sh

bsturmfels
Rewrite the `index` view to avoid risk of path traversal

I've simplified this view by removing the custom HTTP error handlers, Python 3.5
exception handling and adding documentation.
#!/bin/sh

git push
ssh debian@hickory.sfconservancy.org 'bash -s' << EOF
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/python manage.py check
sudo -u www-data /var/www/venv-website/bin/python manage.py migrate
sudo -u www-data /var/www/venv-website/bin/python manage.py collectstatic -v0 --noinput --link
sudo systemctl restart apache2
curl --silent --head https://sfconservancy.org | grep --perl-regexp "^HTTP/.+ 200"
EOF