Hacker News new | ask | show | jobs
by joshmanders 3798 days ago
I've been heavily researching and working with Docker. While I am building my new business, I decided to give back to the open source community and have been doing my best to open source every aspect of the business that I can without giving away our business. One of the things I am doing is abstracting a docker deployment workflow out into a service of it's own.

Basically what I have come up with is a push or merge on master in github, triggers a build in the service, which will push your new image up to docker hub, then ping an agent that runs on your docker host, notifying it of the new image, and any meta data needed to determine how it should proceed.

So for example, if git push to master on app, webhook fires on service, service pulls code, runs commands to run tests if you want, build docker image, etc. Push new image to docker hub, pings agent on docker host, agent gets data, pulls new image, deploys new container, does health checks, and then starts migrating new traffic to the new container before taking old container offline.