Simple utility meant to ease the deployment in self hosted Docker environments.
In swarm mode app requires storing the credentials as Docker secrets
Secrets can be for example created as external secrets beforehand and use them
cat your-docker-password.txt | docker secret create dsd-docker-password -
cat your-ssh-private-key.txt | docker secret create dsd-ssh-private-key -
cat your-gpg-private-key.txt | docker secret create dsd-gpg-private-key -
When run with docker-compose
the secrets part may be "faked" using just pure volume mount.
docker-compose up -d
App reads it's configuration at startup from config.json
{
"token": "foobar",
"envName": "Production",
"slackWebhookUrl": "https://hooks.slack.com/services/YOURSLACKWEBHOOKTOKEN",
"stacks": {
"hello-world": {
"repository": "[email protected]:/yourdomain/yourdeploymentrepository",
"branch": "master",
"command": "docker stack deploy -c docker-compose.yml hello-world"
}
}
}
Required token to authorize requests to this tool. For example "foobar" token is required as header in format Authorization: Token foobar
.
Slack Incoming Webhook url to send notifications to. Notifications are send from both successfull and failed deployments.
Collection of stack configurations. Key represents the stack name.
The deployment repository
of this stack. Configuration is cloned and/or pulled from this specified repository on every deployment.
Branch of the used deployment repository
. Defaults to master
.
The actual deployment command. Usually just docker stack deploy -c docker-compose.yml [stack-name]
.
Just call the /deploy/:stack
endpoint with the stack
name you want to deploy
curl -XPOST --header "Authorization: Token yourowntoken" http://localhost:3000/deploy/hello-world