static ips

This commit is contained in:
2025-07-27 18:03:58 +02:00
parent 27d1a38770
commit 569a743666

View File

@@ -2,15 +2,16 @@ version: "3.8"
services: services:
web: web:
hostname: mechanical-web
container_name: mc-web-mechanical container_name: mc-web-mechanical
image: nginx image: nginx
volumes: volumes:
- ./web:/usr/share/nginx/html - ./web:/usr/share/nginx/html
ports: ports:
- "8080:80" - "8080:80"
networks:
mechanicalnet:
ipv4_address: 172.72.0.20
mc: mc:
hostname: mechanical-neoforge
image: ghcr.io/itzg/minecraft-server:java21-graalvm image: ghcr.io/itzg/minecraft-server:java21-graalvm
tty: true tty: true
stdin_open: true stdin_open: true
@@ -39,6 +40,8 @@ services:
ICON: http://mechanical.oier.ovh/pack/icon.png 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 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
networks:
- mechanicalnet
volumes: volumes:
- ../data/mechanical-neoforge:/data - ../data/mechanical-neoforge:/data
#- ./simple-discord-bot.toml:/data/config/simple-discord-bot.toml #- ./simple-discord-bot.toml:/data/config/simple-discord-bot.toml
@@ -52,6 +55,8 @@ services:
- ./dashboards:/etc/grafana/dashboards - ./dashboards:/etc/grafana/dashboards
depends_on: depends_on:
- prometheus - prometheus
networks:
- mechanicalnet
monitor: monitor:
image: itzg/mc-monitor image: itzg/mc-monitor
command: export-for-prometheus command: export-for-prometheus
@@ -60,6 +65,8 @@ services:
DEBUG: "true" DEBUG: "true"
depends_on: depends_on:
- mc - mc
networks:
- mechanicalnet
cadvisor: cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.1 image: gcr.io/cadvisor/cadvisor:v0.47.1
volumes: volumes:
@@ -67,6 +74,8 @@ services:
- /var/run:/var/run:rw - /var/run:/var/run:rw
- /sys:/sys:ro - /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro - /var/lib/docker/:/var/lib/docker:ro
networks:
- mechanicalnet
prometheus: prometheus:
image: prom/prometheus image: prom/prometheus
ports: ports:
@@ -77,6 +86,8 @@ services:
depends_on: depends_on:
- monitor - monitor
- minecraft-exporter - minecraft-exporter
networks:
- mechanicalnet
minecraft-exporter: minecraft-exporter:
build: build:
context: ./minecraft-exporter context: ./minecraft-exporter
@@ -91,15 +102,17 @@ services:
- ../data/mechanical-neoforge/world:/world:ro - ../data/mechanical-neoforge/world:/world:ro
depends_on: depends_on:
- mc - mc
networks:
- mechanicalnet
volumes: volumes:
mechanical-neoforge: {} mechanical-neoforge: {}
world: {} world: {}
prometheus-tsdb: {} prometheus-tsdb: {}
grafana-lib: {} grafana-lib: {}
#networks:
# mechanicalnet:
# driver: bridge
networks: networks:
default: mechanicalnet:
name: nginx driver: bridge
external: true ipam:
config:
- subnet: 172.72.0.0/16
gateway: 172.72.0.1