homelab/server/config/minecraft/docker-compose.yml

78 lines
1.8 KiB
YAML

version: '3'
services:
router:
image: itzg/mc-router
container_name: minecraft_router
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
networks:
- mc-router
ports:
- 25565:25565
command: --mapping=bmcp.janfer.net=bmcp:25565,e9.janfer.net=e9:25565,fan.janfer.net=fan:25565,vanilla.janfer.net=vanilla:25565,vanilla2.janfer.net=vanilla2:25565 --api-binding=0.0.0.0:25566
exporter-minecraft:
image: itzg/mc-monitor # https://github.com/itzg/mc-monitor
container_name: minecraft_exporter
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
command: export-for-prometheus
restart: "no"
networks:
- monitoring
- mc-router
env_file:
- exporter.env
labels:
- traefik.enable=false
bmcp:
image: itzg/minecraft-server:java17
container_name: minecraft_bmcp
env_file:
- minecraft.env
- bmcp.env
volumes:
- $DOCKER_DATA/bmcp2:/data:rw
networks:
- mc-router
restart: "no"
vanilla:
image: itzg/minecraft-server:latest
container_name: minecraft_vanilla
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
env_file:
- minecraft.env
- vanilla.env
volumes:
- $DOCKER_DATA/vanilla:/data:rw
networks:
- mc-router
networks:
mc-router:
external: true
volumes:
mc-router: