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

Latest commit

 

History

History
49 lines (30 loc) · 1.48 KB

deployment_dokku.md

File metadata and controls

49 lines (30 loc) · 1.48 KB

Deployment with Dokku

Deployment with https://dokku.com/.

Configuration

We are using a custom nginx.conf.sigil. When updating Dokku, make sure to check if the most recent default nginx base is used.

Setup

Set up a Dokku application, create and link a Postgres DB and a Redis instance, respectivly. Then set up all the environment variables. Finally:

git push dokku

Upgrade to a specific postgres/redis version

To use a custom (and updated) image for postgre (and redis): Full the image, and then specify the tag like this:

docker pull postgres:11
dokku postgres:upgrade $dbname -I 11

Here a script to keep the images up to date: https://github.com/jfilter/utils/blob/master/scripts/dokku/update_images.sh

Misc

Volumes

mkdir /var/lib/dokku/data/storage/some-storage

The uid and gid of the user of the Dockerfile (in this case the user django)

chown -R 101:101 /var/lib/dokku/data/storage/some-storage

Backup cronjobs

16 * * * * /usr/bin/dokku run unding ./manage.py dbbackup --encrypt --compress --clean
16 12,19 * * * /usr/bin/dokku run unding ./manage.py mediabackup --encrypt --compress --clean