-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
swarm.docker-compose.yml
60 lines (54 loc) · 1.14 KB
/
swarm.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
56
57
58
59
60
version: '3.8'
services:
router:
image: itzg/mc-router:latest
command: --in-docker-swarm
deploy:
mode: replicated
replicas: 1
ports:
- "25565:25565"
networks:
- minecraft
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mcfoobar:
image: itzg/minecraft-server:latest
tty: true
stdin_open: true
deploy:
mode: replicated
replicas: 1
labels:
- "mc-router.host=foo.host.name,bar.host.name"
- "mc-router.network=minecraft" # not required in this case
volumes:
- mcfoobardata:/data
networks:
- minecraft
environment:
EULA: "true"
mcbaz:
image: itzg/minecraft-server:latest
tty: true
stdin_open: true
deploy:
mode: replicated
replicas: 1
labels:
- "mc-router.host=baz.host.name"
- "mc-router.network=minecraft" # required since we are exposing a port
ports:
- "25575:25575" # RCON
volumes:
- mcbazdata:/data
networks:
- minecraft
environment:
EULA: "true"
volumes:
mcbazdata:
mcfoobardata:
networks:
minecraft:
driver: overlay