palfrey / wharf

Web UI for Dokku
https://tevps.net/blog/2018/2/28/wharf-dokku-web-frontend/
GNU Affero General Public License v3.0
247 stars 21 forks source link
dokku hacktoberfest

Wharf

CI

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

Screenshots

Setup

  1. Install Dokku (versions up to 0.19.13, see #78)
  2. Install the following plugins:
  3. Setup the Let's Encrypt plugin to auto-renew (dokku letsencrypt:cron-job --add)
  4. Create the app (dokku apps:create wharf)
  5. 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
  6. Add Redis (dokku redis:create wharf && dokku redis:link wharf wharf)
  7. Add Postgres (dokku postgres:create wharf && dokku postgres:link wharf wharf)
  8. Set ADMIN_PASSWORD to something secret (dokku config:set wharf ADMIN_PASSWORD=somesecret)
  9. Deploy this Git repo as per the standard Dokku instructions

Helpful hints

Enabling Github auto-deploy webhooks

  1. Set GITHUB_SECRET config item to something secret
  2. Goto settings/webhooks in Github
  3. Make a new webhook for <your Wharf instance>/webhook with Content type as application/json and Secret to the secret from GITHUB_SECRET

Development

Easiest way to do dev is:

  1. vagrant up which will boot the entire Dokku setup in a VM
  2. DOKKU_SSH_HOST=host.docker.internal DOKKU_SSH_PORT=2222 docker-compose up
  3. Load up http://localhost:8000/