Skip to content

chrkaatz/wharf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

589 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  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:
    1. mkdir /var/lib/dokku/data/storage/wharf-ssh/
    2. chown dokku:dokku /var/lib/dokku/data/storage/wharf-ssh/
    3. dokku storage:mount wharf /var/lib/dokku/data/storage/wharf-ssh/:/root/.ssh
  6. Optionally, add dokku-daemon. We still need SSH keys for pushing to Dokku, but this should speed up other Wharf commands:
    1. Install as per instructions at https://github.com/palfrey/dokku-daemon-rs (note the original version should in theory work, but it's JSON support is buggy)
    2. dokku storage:mount wharf /var/run/dokku-daemon/dokku-daemon.sock:/var/run/dokku-daemon/dokku-daemon.sock
  7. Add Redis (dokku redis:create wharf && dokku redis:link wharf wharf)
  8. Add Postgres (dokku postgres:create wharf && dokku postgres:link wharf wharf)
  9. Set ADMIN_PASSWORD to something secret (dokku config:set wharf ADMIN_PASSWORD=somesecret)
  10. Deploy this Git repo as per the standard Dokku instructions
  11. dokku ps:scale wharf celery=1

Helpful hints

  • If you're running SSH on a non-standard port, set DOKKU_SSH_PORT e.g. dokku config:set wharf DOKKU_SSH_PORT=2222
  • If Dokku is running somewhere else than the local machine, set DOKKU_SSH_HOST e.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_BRANCH in the variables to deploy from non-master

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
    • host.docker.internal works on Mac/Windows, but not on Linux (see docker/for-linux#264). On Linux hosts, you should set DOKKU_SSH_HOST to whatever your IP is (not localhost, but a local IP is fine)
  3. Load up http://localhost:8000/

About

Web UI for Dokku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 67.7%
  • HTML 26.7%
  • Shell 5.2%
  • Other 0.4%