- Migrate Paper loader from sunset v2 API to v3 (fill.papermc.io) - Fix NeoForge: fall back to beta versions when no stable exists (set -e + grep) - Fix setEula/setperms ordering (was writing eula.txt before /data was writable) - Fix setEula/serverInfoWrite to use absolute paths (/data/server/) - Add VOLUME directive removal (was shadowing bind mounts) - Add comprehensive API test suite (110 tests across 6 suites) - Move test.sh to tests/integration.sh, switch to named volumes - Add Docker build cache to CI workflows - Add .editorconfig, expand .gitignore, improve README docs
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
services:
|
|
dockercraft:
|
|
image: git.jeremymcclure.com/jeremy/dockercraft:latest
|
|
# Use :dev to test builds from the dev branch
|
|
#image: git.jeremymcclure.com/jeremy/dockercraft:dev
|
|
container_name: dockercraft
|
|
stdin_open: true
|
|
tty: true
|
|
environment:
|
|
- EULA=true
|
|
- MC_VERSION=1.21.1
|
|
|
|
# Server loader type: paper, fabric, forge, neoforge, or bedrock
|
|
- MC_LOADER=neoforge
|
|
|
|
# --- Loader versions -----------------------------------------------
|
|
# Set the var matching your MC_LOADER above. Unset vars are ignored
|
|
# for other loaders. Leave empty to auto-detect latest stable version.
|
|
- FABRIC_LOADER_VERSION=
|
|
- FORGE_VERSION=
|
|
- NEOFORGE_VERSION=
|
|
- PAPER_BUILD=
|
|
#
|
|
# MC_LOADER_VERSION is a fallback for any loader that doesn't have
|
|
# its own var set. You usually don't need this.
|
|
- MC_LOADER_VERSION=
|
|
# -------------------------------------------------------------------
|
|
|
|
# For bedrock, MC_VERSION is the Bedrock server version (e.g. 1.21.50)
|
|
# and no Java is needed.
|
|
#
|
|
# --- Java Version --------------------------------------------------
|
|
# If unset, auto-detected from Mojang version manifest:
|
|
# MC 1.20.5+ -> temurin@21, 1.17-1.20.4 -> temurin@17,
|
|
# 1.17 -> temurin@16, pre-1.17 -> temurin@8
|
|
# Set explicitly to pin a version. Uses Jabba
|
|
# (https://github.com/Jabba-Team/jabba) — supports temurin, zulu,
|
|
# adopt, openjdk, graalvm, and more.
|
|
#- JAVA_VERSION=temurin@21
|
|
# -------------------------------------------------------------------
|
|
- JAR=server.jar
|
|
|
|
- XMS=2G
|
|
- XMX=4G
|
|
- ADD_ARGS=
|
|
|
|
- PUID=1000
|
|
- PGID=1000
|
|
build:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
volumes:
|
|
- ./data:/data
|
|
ports:
|
|
# Java (vanilla, paper, fabric, forge, neoforge): TCP 25565
|
|
# Bedrock: UDP 19132 (and UDP 19133 for IPv6)
|
|
# Expose the port matching your MC_LOADER:
|
|
- 25565:25565
|
|
#- 19132:19132/udp
|
|
#- 19133:19133/udp
|
|
healthcheck:
|
|
test: >
|
|
bash -c '
|
|
if [ "${MC_LOADER}" = "bedrock" ]; then
|
|
nc -zu 127.0.0.1 19132;
|
|
else
|
|
nc -z 127.0.0.1 25565;
|
|
fi
|
|
'
|
|
start_period: 2m
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 4G
|
|
restart: unless-stopped
|