2022-08-05 03:59:20 +02:00
|
|
|
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"
|
2022-11-17 15:38:44 +01:00
|
|
|
- "mc-router.network=minecraft" # not required in this case
|
2022-08-05 03:59:20 +02:00
|
|
|
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"
|
2022-11-17 15:38:44 +01:00
|
|
|
- "mc-router.network=minecraft" # required since we are exposing a port
|
|
|
|
ports:
|
|
|
|
- "25575:25575" # RCON
|
2022-08-05 03:59:20 +02:00
|
|
|
volumes:
|
|
|
|
- mcbazdata:/data
|
|
|
|
networks:
|
|
|
|
- minecraft
|
|
|
|
environment:
|
|
|
|
EULA: "true"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mcbazdata:
|
|
|
|
mcfoobardata:
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
minecraft:
|
|
|
|
driver: overlay
|