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