Traefik Config Review for Blue/Green Deploys

Suggestions and comments welcomed on this setup of a blue/green deploy with Traefik and docker compose please.

Traefik file configuration:

## Dynamic configuration
      name = "green_service@docker"
      weight = 4
      name = "blue_service@docker"
      weight = 1

docker-compose service config. I have another for service_blue:

    build: .
      - traefik.enable=true
      - traefik.http.routers.service_green.rule=Host(``)
      - traefik.http.routers.service_green.tls.certresolver=le
      - traefik.http.routers.service_green.entrypoints=websecure
      driver: awslogs
        awslogs-region: us-east-2
        awslogs-group: service_green

Express app on another container provides webhook endpoints to Github and AWS CloudWatch Alarms. Start and stop containers with docker-compose npm. Checkout new or previous commit prior to build with simple-git npm.

Hey @urgent

A long time ago I've prepared an example for canary deployment using Swarm. it is no longer maintained by me but maybe you will have some insights into that example.

it is worth also implementing the order how contained are being restarted as it is configured at that example.

Thank you

1 Like