GitPedia

Docker nginx blue green

PoC: Blue-green deployment wih Docker Compose, Nginx, Consul and Registrator

From Sinkler·Updated December 26, 2024·View on GitHub·

* Run `docker network create consul` to create a new network; * Run `docker-compose -f docker-compose-consul.yml up -d` to start Consul and Registrator; * Open in browser `http://localhost:8500/` to check; * Run `./deploy.sh` to first run; * Open in browser `http://localhost/` to check; * Run `./deploy.sh` to imitate deploying of a new app; * Open in browser `http://localhost/` to check a new version; * Run `./rollback.sh` to imitate a rollback; * Open in browser `http://localhost/` to check an ... The project is written primarily in Shell, distributed under the MIT License license, first published in 2017. Key topics include: bluegreen, consul, consul-template, deployment, docker.

PoC: Blue-green deployment wih Docker Compose, Nginx, Consul and Registrator

  • Run docker network create consul to create a new network;
  • Run docker-compose -f docker-compose-consul.yml up -d to start Consul and Registrator;
  • Open in browser http://localhost:8500/ to check;
  • Run ./deploy.sh to first run;
  • Open in browser http://localhost/ to check;
  • Run ./deploy.sh to imitate deploying of a new app;
  • Open in browser http://localhost/ to check a new version;
  • Run ./rollback.sh to imitate a rollback;
  • Open in browser http://localhost/ to check an old version;
  • Use python2.7 test.py in a new terminal to be sure that an app is always online during a deploy/rollback.

You can read more about this technique here:
https://medium.com/rate-engineering/using-docker-containers-to-run-a-distributed-application-locally-eeabd360bca3

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from Sinkler/docker-nginx-blue-green via the GitHub API.Last fetched: 6/23/2026