-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (52 loc) · 1.62 KB
/
docker-compose.yml
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
45
46
47
48
49
50
51
52
53
54
55
version: "3.2"
services:
traefik:
image: traefik:latest
command:
- --configFile=/etc/traefik/traefik.yml
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./etc:/etc/traefik:ro
networks:
- internal
whoami:
image: traefik/whoami:latest
deploy:
replicas: 3
labels:
- traefik.enable=true
- traefik.http.routers.whoami.entrypoints=websecure
- traefik.http.routers.whoami.rule=Path(`/whoami`)
- traefik.http.routers.whoami.tls=true
- traefik.http.routers.whoami.service=whoami@swarm
- traefik.http.services.whoami.loadbalancer.server.port=80
- traefik.http.services.whoami.loadbalancer.sticky=true
- traefik.http.services.whoami.loadbalancer.sticky.cookie.name=whoami-session-token
- traefik.http.services.whoami.loadbalancer.sticky.cookie.secure=true
networks:
- internal
nginx:
image: nginx:latest
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.nginx.entrypoints=websecure
- traefik.http.routers.nginx.rule=Path(`/nginx`)
- traefik.http.routers.nginx.tls=true
- traefik.http.routers.nginx.service=nginx@swarm
- traefik.http.routers.nginx.middlewares=strip_nginx
- traefik.http.middlewares.strip_nginx.stripprefix.prefixes=/nginx
- traefik.http.services.nginx.loadbalancer.server.port=80
networks:
- internal
networks:
internal:
driver: overlay
ipam:
config:
- subnet: "172.21.0.0/16"
- subnet: "8008:135:a::0/48"