Suggestions and comments welcomed on this setup of a blue/green deploy with Traefik and docker compose please.
Traefik file configuration:
## Dynamic configuration
[http.services]
[http.services.app]
[[http.services.app.weighted.services]]
name = "green_service@docker"
weight = 4
[[http.services.app.weighted.services]]
name = "blue_service@docker"
weight = 1
docker-compose service config. I have another for service_blue:
service_green:
build: .
labels:
- traefik.enable=true
- traefik.http.services.service_green.loadbalancer.server.port=3000
- traefik.http.routers.service_green.rule=Host(`service.com`)
- traefik.http.routers.service_green.tls.certresolver=le
- traefik.http.routers.service_green.entrypoints=websecure
logging:
driver: awslogs
options:
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.