105 lines
2.7 KiB
YAML
105 lines
2.7 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
web:
|
|
hostname: mechanical-web
|
|
container_name: mc-web-mechanical
|
|
image: nginx
|
|
volumes:
|
|
- ./web:/usr/share/nginx/html
|
|
ports:
|
|
- "8080:80"
|
|
mc:
|
|
hostname: mechanical-neoforge
|
|
image: ghcr.io/itzg/minecraft-server:java21-graalvm
|
|
tty: true
|
|
stdin_open: true
|
|
depends_on:
|
|
- web
|
|
ports:
|
|
- "25565:25565"
|
|
- "24454:24454/udp"
|
|
restart: unless-stopped
|
|
container_name: mc-neoforge-mechanical
|
|
environment:
|
|
OVERRIDE_SERVER_PROPERTIES: "TRUE"
|
|
EULA: "TRUE"
|
|
PACKWIZ_URL: http://mechanical.oier.ovh/pack/pack.toml
|
|
TYPE: NEOFORGE
|
|
VERSION: "1.21.1"
|
|
NEOFORGE_VERSION: 21.1.193
|
|
MEMORY: 30G
|
|
MOTD: "§l§cMechanical SMP§r"
|
|
ONLINE_MODE: "FALSE"
|
|
ALLOW_FLIGHT: "TRUE"
|
|
RCON_PASSWORD: "${RCON_PASSWORD}"
|
|
BROADCAST_RCON_TO_OPS: "FALSE"
|
|
EXISTING_OPS_FILE: SYNCHRONIZE
|
|
ENABLE_QUERY: "TRUE"
|
|
ICON: http://mechanical.oier.ovh/pack/icon.png
|
|
JVM_OPTS: -Dminecraft.api.env=custom -Dminecraft.api.auth.host=https://auth.oier.ovh -Dminecraft.api.account.host=https://auth.oier.ovh/user -Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil -Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil
|
|
|
|
volumes:
|
|
- ../data/mechanical-neoforge:/data
|
|
#- ./simple-discord-bot.toml:/data/config/simple-discord-bot.toml
|
|
grafana:
|
|
image: grafana/grafana-oss:${GRAFANA_VERSION:-8.3.3}
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- grafana-lib:/var/lib/grafana
|
|
- ./grafana/provisioning:/etc/grafana/provisioning
|
|
- ./dashboards:/etc/grafana/dashboards
|
|
depends_on:
|
|
- prometheus
|
|
monitor:
|
|
image: itzg/mc-monitor
|
|
command: export-for-prometheus
|
|
environment:
|
|
EXPORT_SERVERS: mc
|
|
DEBUG: "true"
|
|
depends_on:
|
|
- mc
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:v0.47.1
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
prometheus:
|
|
image: prom/prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus-tsdb:/prometheus
|
|
depends_on:
|
|
- monitor
|
|
- minecraft-exporter
|
|
minecraft-exporter:
|
|
build:
|
|
context: ./minecraft-exporter
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
RCON_HOST: mc
|
|
RCON_PORT: 25575
|
|
RCON_PASSWORD: "${RCON_PASSWORD}"
|
|
FORGE_SERVER: True
|
|
volumes:
|
|
- ../data/mechanical-neoforge/world:/world:ro
|
|
depends_on:
|
|
- mc
|
|
volumes:
|
|
mechanical-neoforge: {}
|
|
world: {}
|
|
prometheus-tsdb: {}
|
|
grafana-lib: {}
|
|
#networks:
|
|
# mechanicalnet:
|
|
# driver: bridge
|
|
networks:
|
|
default:
|
|
name: nginx
|
|
external: true |