Skip to content

Instantly share code, notes, and snippets.

@natanlao
Last active March 30, 2021 22:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Dokku reference

I host side projects on a DigitalOcean droplet running Dokku. For reference:

One-time setup of Lets Encrypt

$ ssh root@platform.natan.la sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
$ ssh dokku@platform.natan.la dokku letsencrypt:cron-job --add

Creating an app

With a Dockerfile or Procfile:

$ ssh dokku@platform.natan.la apps:create $NAME
$ git remote add dokku dokku@platform.natan.la:$NAME
$ git push dokku master
$ ssh dokku@platform.natan.la config:set--no-restart $NAME DOKKU_LETSENCRYPT_EMAIL=${NAME}@natan.la
$ ssh dokku@platform.natan.la letsencrypt $NAME

Remember to map the subdomain with an A record to the droplet.

Add SSH key

$ ssh root@platform.natan.la sudo dokku ssh-tags:add github-deploy < id_ed25519.pub

Looking forward

Ideally, projects with a Dockerfile should be built "locally" (i.e., not on the droplet) since the droplet isn't particularly powerful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment