-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-domain.yml
113 lines (105 loc) · 2.84 KB
/
docker-compose-domain.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '3.7'
services:
traefik:
image: traefik:v2.0.7
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./dyn-traefik.yml:/etc/traefik/traefik.yml
networks:
- world
- proxy
deploy:
replicas: 1
placement:
constraints: [node.role==manager]
restart_policy:
condition: on-failure
nginx:
image: nginx
networks:
- world
- child
deploy:
replicas: 1
labels:
- traefik.enable=true
- traefik.docker.lbswarm=true
- traefik.docker.network=domain_world
- traefik.http.routers.nginx.rule=Host(`domain.local`)
- traefik.http.routers.nginx.entrypoints=web
- traefik.http.routers.nginx.service=nginx1
- traefik.http.services.nginx1.loadbalancer.server.port=80
- traefik.http.services.nginx1.loadbalancer.server.scheme=http
- traefik.http.services.nginx1.loadbalancer.passhostheader=true
- traefik.http.services.nginx1.loadbalancer.sticky=true
whoami:
image: containous/whoami
networks:
- world
- child
deploy:
replicas: 1
labels:
- traefik.enable=true
- traefik.docker.lbswarm=true
- traefik.docker.network=domain_world
- traefik.http.routers.whoami.rule=Host(`domain.local`) && Path(`/whoami`)
- traefik.http.routers.whoami.entrypoints=web
- traefik.http.routers.whoami.service=whoami1
- traefik.http.services.whoami1.loadbalancer.server.port=80
- traefik.http.services.whoami1.loadbalancer.server.scheme=http
- traefik.http.services.whoami1.loadbalancer.passhostheader=true
- traefik.http.services.whoami1.loadbalancer.sticky=true
visualizer:
image: dockersamples/visualizer:stable
ports:
- 9001:8080
stop_grace_period: 1m30s
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints: [node.role==manager]
agent:
image: portainer/agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- world
deploy:
mode: global
placement:
constraints: [node.platform.os==linux]
portainer:
image: portainer/portainer
command: -H tcp://tasks.agent:9001 --tlsskipverify
ports:
- 8000:8000
- 9000:9000
stop_grace_period: 1m30s
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
networks:
- world
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role==manager]
networks:
world:
external: true
attachable: true
driver: overlay
name: domain_world
proxy:
driver: overlay
name: domain_proxy
child:
volumes:
portainer_data: