Add Docker build system for ZomboidForge with containerized server setup, Gradle build logic, and project configuration.

This commit is contained in:
Overlord committed 2026-09-28 23:12:57 +02:00
1 parent d4c5a9d45f
commit bf9228d2be
18 files changed
+747 -55

No files matched your search

+41 -1
View File
@@ -1,3 +1,43 @@
# ZomboidForge
An official‑client‑compatible, container‑ready Project Zomboid dedicated server with first‑class support for custom Java mods and drop‑in server builds.
An official‑client‑compatible, container‑ready Project Zomboid dedicated server with
first‑class support for custom Java mods and drop‑in server builds.
## Building
The container image downloads the vanilla dedicated server (Steam app 380870) with an
anonymous steamcmd login while it builds, and patches it. No game files are part of this
repository.
```sh
podman build --platform linux/amd64 -t zomboidforge . # or: docker build ...
```
## Running
```sh
podman run -d --name zomboidforge \
-e ADMIN_PASSWORD=... -e RCON_PASSWORD=... \
-p 16261:16261/udp -p 16262:16262/udp -p 27015:27015/tcp \
-v zomboid-data:/data zomboidforge
```
| Variable | Default | |
|---|---|---|
| `SERVER_NAME` | `zomboidforge` | Server config name (`/data/Server/<name>.ini`) |
| `ADMIN_PASSWORD` | | Required on the first start, when the admin account is created |
| `RCON_PASSWORD` | | Written into the server ini on every start; RCON is disabled without it |
| `JVM_MAX_HEAP` | `8g` | `-Xmx` |
| `STEAM` | `1` | `0` runs the server without Steam |
For local testing there is `compose.yaml` (`podman compose up --build`, passwords from `.env`).
## Development
Requires JDK 25 (the game's runtime). The Gradle build compiles against a local vanilla
server jar, `lib/server/java/projectzomboid.jar` by default (override with `-Ppz.jar=...`).
```sh
./gradlew build # compile + tests
./gradlew :patcher:patchServerJar # -> patcher/build/server/projectzomboid.jar
```