Shipment Deploy is a docker container that will manage deployments on your server. It exposes an api for deploying docker containers from github repos.
- Fetch latest code, build, run new code and stop existing containers
- Github Personal Access Token. It is recommended to create a separate user for deployments that you add to the repos you want to deploy.
docker run -v /var/run/docker.sock:/var/run/docker.sock -e GH_USERNAME=username -e GH_TOKEN=token -e SECRET=secret -p 5000 shipment/deploy
http://${server host}:${deploy port}/deploy?org=${org}&repo=${repo}&branch=${branch}&secret=${secret}`
- add
http://[server host]:[deploy port]/github
to your repo's webhooks - put the same secret that you set up when running the container
The deploy script will automatically look for autodeploy.json
in your repo's folder. In there you can set additional docker args:
{
"dockerargs": "-e NODE_ENV=production"
}