DurhamARC / ManyFEWS

The Many Flood Early Warning System
GNU General Public License v3.0
7 stars 3 forks source link

Document production deployment #87

Closed sjmf closed 2 years ago

sjmf commented 2 years ago

Production deployment is easy, but requires a set of prequisite steps. These should be documented in a file called PRODUCTION.MD along with the requisite docker-compose commands.

Consider also moving documentation out of the root of the repo into a subfolder, and linking it from the top-level README.MD.

sjmf commented 2 years ago

Production deployment steps:

  1. Install Docker and docker-compose on your production instance.
  2. Clone the git repo (or at a minimum, docker-compose.yml and production.yml)
  3. Move production.yml to docker-compose.override.yml
  4. Copy manyfews/manyfews/.env.CI to .env
  5. Edit .env to populate it with production environment variables.
  6. Run docker-compose pull && docker-compose up -d
  7. Check that the ports for :80 and :443 are open to serve http+s traffic.
  8. Wait for certificate issuance while Traefik uses Let'sEncrypt to request a TLS cert.
sjmf commented 2 years ago

Further:

  1. Create superuser: docker-compose exec gunicorn bash --login -c "python manage.py createsuperuser"
sjmf commented 2 years ago

PRODUCTION.md has been completed as of commit bf0a01c.