Motivation
I shot myself in the foot by procrastinating writing this post years ago and having to figure it out all over again yesterday. Never again.
Here be the commands
- Install the postgres plugin if you haven’t
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
- Create the database
dokku postgres:create commento
- Set up the environment variables & domain
dokku apps:create commento
dokku config:set COMMENTO_ORIGIN=http://<your commento domain>
dokku config:set COMMENTO_POSTGRES=<your postgres url from step 2>
dokku domains:add commento http://<your commento domain>
Now set up an A record pointing your Commento subdomain to your server IP.
- Deploy commento
docker pull registry.gitlab.com/commento/commento
docker tag registry.gitlab.com/commento/commento dokku/commento
dokku tags:deploy commento
dokku proxy:ports-set commento http:80:8080 # if your proxy isn't set up properly
- Set up SSL
dokku letsencrypt commento
- After setting up a new account, forbid new owner signups (if it applies to you)
dokku config:set commento COMMENTO_FORBID_NEW_OWNERS=true
- If anything goes wrong, read the logs
dokku logs commento