forked from nginx-proxy/nginx-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswarm.stack.yml
48 lines (44 loc) · 1.03 KB
/
swarm.stack.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
services:
proxy:
deploy:
mode: global
build:
context: .
image: pitilezard/nginx-proxy-swarm
networks:
- proxy
ports:
- "80:80"
environment:
- NODE_HOSTNAME={{.Node.Hostname}}
- SERVER_OPTIONS=max_fails=0
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /tmp/proxyconf/:/etc/nginx/node.conf.d/
whoami1:
deploy:
replicas: 1
image: jwilder/whoami
networks:
- proxy
environment:
- VIRTUAL_HOST=1.whoami.local
whoami2:
deploy:
replicas: 2
image: jwilder/whoami
networks:
- proxy
environment:
- VIRTUAL_HOST=2.whoami.local
whoami3:
deploy:
replicas: 3
image: jwilder/whoami
networks:
- proxy
environment:
- VIRTUAL_HOST=3.whoami.local
networks:
proxy:
name: proxy