Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Latest commit

 

History

History
32 lines (26 loc) · 1003 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 1003 Bytes

Zosia Server

Letsencrypt

To set up certificate, run:

sudo letsencrypt certonly --webroot -w /var/www/well-known -d staging.zosia.org:

Not covered:

Secrets

(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

Migrations

(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