forked from Yutaro-Kashiwa/SystemDevelopment7th
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (41 loc) · 1.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (41 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: "3.8"
services:
# Traefik Reverse Proxy
traefik:
image: traefik:v3.6
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/etc/traefik/dynamic.yml"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik-dynamic.yml:/etc/traefik/dynamic.yml:ro
# Stable version (v1) - 90% of traffic
app-stable:
build:
context: .
dockerfile: Dockerfile
environment:
- VERSION=1.0.0
- BG_COLOR=#3498db
- STATUS=STABLE
labels:
- "traefik.enable=true"
- "traefik.http.services.app-stable.loadbalancer.server.port=8080"
# Canary version (v2) - 10% of traffic
app-canary:
build:
context: .
dockerfile: Dockerfile
environment:
- VERSION=2.0.0
- BG_COLOR=#e74c3c
- STATUS=CANARY
labels:
- "traefik.enable=true"
- "traefik.http.services.app-canary.loadbalancer.server.port=8080"