Code Monkey home page Code Monkey logo

blue-green's Introduction

Blue-Green Deployment

This repository contains the files for the docker image hanzel/blue-green, that will create blue-green deployment. It uses nginx using consul template. It requires consul as the key value store and registrator service running in each host. It works with docker swarm and multi-host networking.

Usage

Set the following environment variables:

  • BLUE_NAME: The container name that we want as the blue service. Default: blue.
  • GREEN_NAME: The container name that we want as the green service. Default: green.
  • LIVE: The service that is in production initially. Default: blue.
  • CONSUL_URL: URL endpoint for consul instance.

Docker Compose

Sample docker-compose.yml configuration is given below:

version: '2'

services:
  bg:
    image: hanzel/blue-green
    container_name: bg
    ports:
      - "80:80"
      - "8080:8080"
    environment:
      - CONSUL_URL=${IP}:8500
      - BLUE_NAME=blue
      - GREEN_NAME=green
      - LIVE=blue
    depends_on:
      - green
      - blue
    networks:
      - front-tier

  blue:
    image: hanzel/nginx-html:1
    ports:
      - "80"
    environment:
      - SERVICE_80_NAME=blue
    networks:
      - front-tier

  green:
    image: hanzel/nginx-html:2
    ports:
      - "80"
    environment:
      - SERVICE_80_NAME=green
    networks:
      - front-tier

networks:
  front-tier:
    driver: bridge

blue-green's People

Contributors

hanzeljesheen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.