Wharf is an opinionated web frontend for Dokku. You can also use the command line version, but most features you'll need day-to-day are in the Web UI
- Install Dokku
- Install the following plugins:
- https://github.com/dokku/dokku-redis
- https://github.com/dokku/dokku-postgres
- https://github.com/dokku/dokku-letsencrypt
- Setup the Let's Encrypt plugin to auto-renew (
dokku letsencrypt:cron-job --add) - Create the app (
dokku apps:create wharf) - Add SSH key storage:
mkdir /var/lib/dokku/data/storage/wharf-ssh/chown dokku:dokku /var/lib/dokku/data/storage/wharf-ssh/dokku storage:mount wharf /var/lib/dokku/data/storage/wharf-ssh/:/root/.ssh
- Add Redis (
dokku redis:create wharf && dokku redis:link wharf wharf) - Add Postgres (
dokku postgres:create wharf && dokku postgres:link wharf wharf) - Set
ADMIN_PASSWORDto something secret (dokku config:set wharf ADMIN_PASSWORD=somesecret) - Deploy this Git repo as per the standard Dokku instructions
dokku ps:scale wharf celery=1
- If you're running SSH on a non-standard port, set
DOKKU_SSH_PORTe.g.dokku config:set wharf DOKKU_SSH_PORT=2222 - If Dokku is running somewhere else than the local machine, set
DOKKU_SSH_HOSTe.g.dokku config:set wharf DOKKU_SSH_HOST=foo.example.com - If there's a Dockerfile in your repository, it'll try and deploy using that by default. Set BUILDPACK_URL to override
- BUILDPACK_URL should be an HTTPS one, not a SSH or heroku/something one
- You should setup the global domain name when creating Dokku to start with and add a *.<your dokku domain> entry to give new apps more usable names.
- Set
GIT_BRANCHin the variables to deploy from non-master
- Set
GITHUB_SECRETconfig item to something secret - Goto settings/webhooks in Github
- Make a new webhook for <your Wharf instance>/webhook with Content type as
application/jsonand Secret to the secret fromGITHUB_SECRET
Easiest way to do dev is:
vagrant upwhich will boot the entire Dokku setup in a VMDOKKU_SSH_HOST=host.docker.internal DOKKU_SSH_PORT=2222 docker-compose uphost.docker.internalworks on Mac/Windows, but not on Linux (see docker/for-linux#264). On Linux hosts, you should setDOKKU_SSH_HOSTto whatever your IP is (not localhost, but a local IP is fine)
- Load up
http://localhost:8000/

