Skip to content
A Lee edited this page Sep 29, 2016 · 5 revisions

Docker deployment

  1. Copy appropriate development.yml or production.yml to docker-compose.yml. Edit postgres database password, can generate one via
     import os
     os.urandom(24).encode('hex') # or
    
     import random,string
     ''.join([random.SystemRandom().choice("{}{}".format(string.ascii_letters, string.digits)) for i in range(63)])
    
  2. Copy settings/local.py.example to settings/local.py and set SECRET_KEY and db password
  3. Run docker-compose build
  4. Check sanity of configuration, then run docker-compose up -d nginx
  5. Upgrading postgres is tricky, simplest at the moment is to dump database and reload from dump in upgraded version (currently pinned to 9.6) - https://github.com/docker-library/postgres/issues/37
Clone this wiki locally