{"id":19516121,"url":"https://github.com/deviantony/docker-bg","last_synced_at":"2026-03-01T09:32:57.119Z","repository":{"id":27454080,"uuid":"30932784","full_name":"deviantony/docker-bg","owner":"deviantony","description":"BlueGreen deployment attempt with Docker","archived":false,"fork":false,"pushed_at":"2015-02-21T16:19:40.000Z","size":108,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T09:02:44.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nginx","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deviantony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-17T19:12:59.000Z","updated_at":"2021-09-10T17:52:33.000Z","dependencies_parsed_at":"2022-09-02T07:50:25.539Z","dependency_job_id":null,"html_url":"https://github.com/deviantony/docker-bg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deviantony/docker-bg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fdocker-bg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fdocker-bg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fdocker-bg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fdocker-bg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deviantony","download_url":"https://codeload.github.com/deviantony/docker-bg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fdocker-bg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T23:44:37.341Z","updated_at":"2026-03-01T09:32:57.056Z","avatar_url":"https://github.com/deviantony.png","language":"Nginx","readme":"# docker-bg\n\nAn attempt of Blue Green deployment using Docker.\n\n# About\n\nThis POC is powered by the following tools:\n\n* Fig: a tool used to manage an application in distributed containers.\n\u003e See: http://www.fig.sh/\n\n* Nginx: an HTTP and reverse proxy server.\n\u003e See: http://nginx.org/\n\n* Consul: a tool for discovering and configuring services in your infrastructure.\n\u003e See: https://www.consul.io/\n\n* Consul-template: a daemon used to populate values from Consul on your filesystem.\n\u003e See: https://github.com/hashicorp/consul-template\n\n* Registrator: a tool that automatically register/deregister Docker containers into Consul.\n\u003e See: https://github.com/gliderlabs/registrator\n\n# How to\n\n## Pre-requisites\n\nEnsure you have Docker installed.\n\nInstall fig:\n\n````\n$ sudo pip install -U fig\n````\n\nUpdate the *fig.yml* file and replace *ROUTABLE_IP* with a routable IP address (use your main interface IP address).\n\nBuild the 2 sites images:\n\n````\n$ docker build -t sitea siteA/\n$ docker build -t siteb siteB/\n````\n\n## Let's play\n\nStart the Nginx + Consul + Registrator stack:\n\n````\n$ fig pull \u0026 fig build\n$ fig up -d\n````\n\nStart a \"v1\" container:\n\n````\n$ docker run -d -e \"SERVICE_NAME=my_service\" -e \"SERVICE_TAGS=my_tag\" -p 80 -d sitea\n````\n\nPoint your browser at http://localhost to see the result.\n\nNext, start a \"v2\" container:\n\n````\n$ docker run -d -e \"SERVICE_NAME=my_service\" -e \"SERVICE_TAGS=my_tag\" -p 80 -d siteb\n````\n\nPoint your browser at http://localhost to see the result, you should now be load balanced between the 2 versions.\n\nStop your v1 container and enjoy a smooth BG deployment :)\n\n## Bonus\n\nAccess the Consul UI via http://localhost:8500\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviantony%2Fdocker-bg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeviantony%2Fdocker-bg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviantony%2Fdocker-bg/lists"}