Dockup creates disposable staging environments for your services using docker-compose.
You can automate staging deployments when you submit pull requests:
Or whenever you feel like, using Slack etc:
- Automatic staging environments for PRs using Github webhooks
- API and UI to deploy apps in git reposisotries
- Supports multi-container environments
- Automatic creation/renewal of SSL certs using Letsencrypt
- Basic auth
- Automatic cleanup of expired environments
- Tail logs of running apps
- Clone the repository
- Inside the project directory, copy
.env.example
to.env
and replace dummy values with actual ones - Run
docker-compose up
Dockup now supports multiple backends for deploying apps. They include:
compose
: Usesdocker-compose.yaml
file in project root directoryhelm
: Uses helm package underhelm
folder in project root directoryfake
: Stubs out deployments, useful for UI development.
Backend can be specified using DOCKUP_BACKEND
environment variable. If no value
is specified, backend will be defaulted to fake
# Install latest elixir
brew install elixir
cd dockup
./scripts/setup
mix deps.get
iex -S mix phx.server
You can access Dockup UI at http://localhost:4000.
Its advised to set dockup base domain using environment variable. Say if the
environment variable DOCKUP_BASE_DOMAIN
is set to dockup.yourdomain.com
,
then interface for dockup will be accessible at ui.dockup.yourdomain.com
This allows users to obtain wildcard certificate for base domain, and then
dockup will use the same wildcard.
All required environment variables are present in .env.example
. Modify them
as needed when copying the file to .env
. For additional configuration options,
refer apps/dockup/lib/dockup/config.ex
.
Set DOCKUP_HTPASSWD
environment variable with the contents of the htpasswd file
generated using the desired username and password for basic auth. You can use
this tool to generate this
string. The same username/password combo works for both dockup app and the log
tailing page.
Dockup will not be able to deploy git repositories unless the git repo URLs are whitelisted. To do this, use the "Whitelisted URLs" navbar link to create whitelisted git URLs.
To enable Github webhooks, you need to generate personal access token (OAuth token)
of a user(preferably a bot user) who has access to the repos you are planning to deploy using dockup.
Once you have it, set it in the environment variable DOCKUP_GITHUB_OAUTH_TOKEN
before starting dockup. This token will need "repo" scope which is configurable from
the settings page.
This API endpoint is used to deploy a dockerized app.
curl -XPOST -d '{"git_url":"https://github.com/code-mancers/project.git","branch":"master","callback_url":"fake_callback"}' -H "Content-Type: application/json" http://localhost:4000/api/deployments