initial commit
This commit is contained in:
106
docker-compose.yml
Normal file
106
docker-compose.yml
Normal file
@@ -0,0 +1,106 @@
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Minecraft 1.21.1 NeoForge + Drasl auth (with Keycloak OIDC)
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
# Assumes:
|
||||
# - Keycloak is already running and reachable at https://keycloak.home.local
|
||||
# - AdGuard Home resolves drasl.home.local -> this host's LAN IP
|
||||
# - This host's LAN IP is on the same segment as the LAN party
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
|
||||
services:
|
||||
drasl:
|
||||
image: unmojang/drasl:latest
|
||||
container_name: drasl
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "25585:25585" # Drasl web UI + Yggdrasil API
|
||||
volumes:
|
||||
- ./drasl/config:/etc/drasl:ro
|
||||
- drasl_state:/var/lib/drasl
|
||||
networks:
|
||||
- mcnet
|
||||
# No env vars needed — all config is in ./drasl/config/config.toml
|
||||
|
||||
minecraft:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft
|
||||
restart: unless-stopped
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "24454:24454/udp" # Simple Voice Chat, if used
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
VERSION: "1.21.1"
|
||||
NEOFORGE_VERSION: "21.1.209" # pin a known-good build; update deliberately
|
||||
|
||||
# ── Memory / performance ────────────────────────────────────
|
||||
INIT_MEMORY: "4G"
|
||||
MAX_MEMORY: "10G" # 8 players + 100 mods comfortably
|
||||
USE_AIKAR_FLAGS: "TRUE"
|
||||
JVM_XX_OPTS: "-XX:+UseG1GC"
|
||||
|
||||
# ── Auth: offline mode + authlib-injector pointing at Drasl ─
|
||||
ONLINE_MODE: "FALSE"
|
||||
# mount authlib-injector.jar at /extras/authlib-injector.jar
|
||||
JVM_OPTS: "-javaagent:/extras/authlib-injector.jar=http://drasl.home.local:25585/authlib-injector"
|
||||
|
||||
# ── Server config ───────────────────────────────────────────
|
||||
DIFFICULTY: "normal"
|
||||
MODE: "survival"
|
||||
MOTD: "LAN party — kitchen sink"
|
||||
MAX_PLAYERS: "10"
|
||||
VIEW_DISTANCE: "10"
|
||||
SIMULATION_DISTANCE: "8"
|
||||
ENFORCE_SECURE_PROFILE: "FALSE" # required for authlib-injector on 1.21+
|
||||
ALLOW_FLIGHT: "TRUE" # many tech mods need this
|
||||
|
||||
# ── Mod sources (Modrinth recommended over CF) ──────────────
|
||||
MODRINTH_PROJECTS: "@/extras/modrinth-mods.txt"
|
||||
MODRINTH_DOWNLOAD_DEPENDENCIES: "required"
|
||||
# Optional, only if you need CF-exclusive mods:
|
||||
# CF_API_KEY: ${CF_API_KEY}
|
||||
# CURSEFORGE_FILES: "@/extras/cf-mods.txt"
|
||||
|
||||
# ── RCON for remote admin ───────────────────────────────────
|
||||
ENABLE_RCON: "TRUE"
|
||||
RCON_PASSWORD: ${RCON_PASSWORD}
|
||||
RCON_PORT: 25575
|
||||
|
||||
TZ: "Europe/Madrid"
|
||||
volumes:
|
||||
- mc_data:/data
|
||||
- ./extras:/extras:ro # authlib-injector.jar + mod lists live here
|
||||
depends_on:
|
||||
- drasl
|
||||
networks:
|
||||
- mcnet
|
||||
|
||||
# Optional: backups
|
||||
mc-backup:
|
||||
image: itzg/mc-backup
|
||||
container_name: mc-backup
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
BACKUP_INTERVAL: "6h"
|
||||
RCON_HOST: "minecraft"
|
||||
RCON_PASSWORD: ${RCON_PASSWORD}
|
||||
PRUNE_BACKUPS_DAYS: "14"
|
||||
TZ: "Europe/Madrid"
|
||||
volumes:
|
||||
- mc_data:/data:ro
|
||||
- ./backups:/backups
|
||||
depends_on:
|
||||
- minecraft
|
||||
networks:
|
||||
- mcnet
|
||||
|
||||
volumes:
|
||||
drasl_state:
|
||||
mc_data:
|
||||
|
||||
networks:
|
||||
mcnet:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user