Dokku commands: Heroku like deployment with support for docker

Initial setup

  • Use digital ocean image with Dokku pre-installed, set up ssh key through web.
  • apt update && apt full-upgrade to update packages.
  • dokku apps:create myapp.somedomain.com and add git remote add dokku dokku@DOKKU_HOSTNAME:myapp.somedomain.com
  • I used /etc/hosts to access the image from a hostname instead of IP.
  • More detailed setup in the various deploy with dokku guides I was following.

Database

Configuring

  • dokku git:set --global deploy-branch production
  • dokku git:set myapp.somedomain.com deploy-branch staging
  • dokku config:set myapp.somedomain.com MY_ENV_VAR=value
  • dokku config:unset myapp.somedomain.com MY_ENV_VAR

Checking

  • dokku domains:report lists domains used per app
  • dokku apps:list for a simple list
  • dokku report myapp.somedomain.com to get some detailed output
  • docker ps --all to see containers that have been running
  • dokku run myapp.subdomain.com 'whoami' runs shell commands in a container

SSL

Configure with the LetsEncrypt plugin:

  • dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
  • dokku config:set --no-restart myapp.somedomain.com DOKKU_LETSENCRYPT_EMAIL=your@e.mail
  • dokku letsencrypt myapp.somedomain.com
  • dokku letsencrypt:cron-job --add to set up auto-renewal

One thought on “Dokku commands: Heroku like deployment with support for docker

  1. Good Morning!,

    Sorry to bother you, but I wanted to ask a quick question. Is there room to improve when it comes to your website? I ask because most sites need edits, tweaks, content, logos, SEO, marketing, branding, etc. and that’s why I reached out to you.

    My name is James and I go around the internet and test services and digital marketplaces to see if they’re legitimat. When I come across some great one, I let everyone know what I decided to stick with, and that’s exactly why I reached out to you today.

    You can see my 2 big winners here: https://webvetted.com

    Go through the sites, find some services you like, reach out to a few people if you want to push your website to be even better šŸ™‚

    Thanks

    – James

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: