To set up certificate, run:
sudo letsencrypt certonly --webroot -w /var/www/well-known -d staging.zosia.org:
- Datadog agent setup - simply follow steps on https://app.datadoghq.com/.
(on server)
- Edit
/srv/pillar/secrets.sls
to update secrets managed by Salt. - Map under
gunicorn_env
will be passed to Python server. Thus,secrets.sls
:
gunicorn_env:
foo: bar
will result in os.environ.get('FOO') == 'bar'
in Django.
- Run
sudo salt-call --local state.apply
to sync afterwards
(on server)
- Ensure latest changes are pulled:
sudo bash /srv/zosia-site/scripts/sync.sh
- sudo to zosia user:
sudo -iu zosia bash
- cd to app directory
cd /var/www/app
- source virtualenv
source ../env/bin/activate
- run migrations
python manage.py migrate