og-cod-plutainer/examples/multi-server.yml

80 lines
2.3 KiB
YAML
Raw Permalink Normal View History

docs: split the README into task-focused pages, rework the examples The README had grown to 388 lines of reference material and was reported as too difficult to follow. It is now a 72-line landing page - a working compose block, the game table, and an index - with the detail moved to whichever page owns it: docs/quickstart.md first server, start to finish docs/games.md per game: files, keys, config names, quirks docs/configuration.md environment variable reference docs/volumes-and-configs.md volume layout, config symlinks, logs docs/rcon.md passwords, rcon-cli, who may send RCON docs/iw4madmin.md sidecar setup, parsers, the whitelist trap docs/healthcheck.md what healthy means, restarts, autoheal docs/troubleshooting.md symptom-first FAQ Nothing was dropped; the length came out of duplication. The troubleshooting page is deliberately symptom-first, and every entry is a failure that actually happened - the T5 key that presents as a broken server, the CoD4x RCON password silently refused for being under 8 characters, the IW4MAdmin whitelist. Examples are split by scenario under examples/, replacing the single 228-line file: single-server, per-game (a block for all seven), multi-server, with-iw4madmin, and env.example for secrets. EXAMPLE-docker-compose.yml stays as a signpost because forum posts link to it. The IW4MAdmin example and docs now mount the log FILE rather than the app directory. Pointing IW4MAdmin at Plutainer's logs/ symlink means it silently ingests nothing: it decides whether to read by comparing the file's size, and .NET reports a symlink's size as the length of the link text, so the log never appears to grow. Mounting the file makes Docker resolve the symlink at mount time. Verified across all eleven servers. docs/ and examples/ are excluded from the build context.
2026-08-15 17:22:30 +01:00
# Several servers on one host.
#
# The pattern: one game-files copy shared read-only by everything that uses it,
# one app directory and one port per server.
x-plutainer: &plutainer
image: ghcr.io/ayymoss/plutainer:latest
restart: unless-stopped
networks: [games-net]
services:
t6zm-1:
<<: *plutainer
container_name: t6zm-1
ports: ["4976:4976/udp"]
volumes:
- /opt/game-files/T6ServerFiles:/home/plutainer/gamefiles:ro # shared
- ./t6zm-1:/home/plutainer/app # per-server
environment:
PLUTAINER_GAME: t6zm
PLUTAINER_CONFIG_FILE: dedicated_zm.cfg
PLUTAINER_PORT: "4976"
PLUTO_SERVER_KEY: ${T6ZM_KEY}
PLUTAINER_RCON_PASSWORD: ${T6ZM_RCON}
t6mp-1:
<<: *plutainer
container_name: t6mp-1
ports: ["4977:4977/udp"]
volumes:
- /opt/game-files/T6ServerFiles:/home/plutainer/gamefiles:ro # same files
- ./t6mp-1:/home/plutainer/app # own data
environment:
PLUTAINER_GAME: t6mp
PLUTAINER_CONFIG_FILE: dedicated.cfg
PLUTAINER_PORT: "4977"
PLUTO_SERVER_KEY: ${T6MP_KEY}
PLUTAINER_RCON_PASSWORD: ${T6MP_RCON}
iw4x-1:
<<: *plutainer
container_name: iw4x-1
ports: ["28960:28960/udp"]
volumes:
- /opt/game-files/IW4xServerFiles:/home/plutainer/gamefiles:ro
- ./iw4x-1:/home/plutainer/app
environment:
PLUTAINER_GAME: iw4x
PLUTAINER_CONFIG_FILE: server.cfg
PLUTAINER_PORT: "28960"
PLUTAINER_RCON_PASSWORD: ${IW4X_RCON}
cod4x-1:
<<: *plutainer
container_name: cod4x-1
ports: ["28965:28965/udp"]
volumes:
- /opt/game-files/IW3ServerFiles:/home/plutainer/gamefiles:ro
- ./cod4x-1:/home/plutainer/app
environment:
PLUTAINER_GAME: cod4x
PLUTAINER_CONFIG_FILE: server.cfg
PLUTAINER_PORT: "28965"
PLUTAINER_RCON_PASSWORD: ${COD4X_RCON}
# Restarts servers that go unhealthy. Docker's own restart policy only
# reacts to a container *exiting*, which a hung server never does.
autoheal:
image: willfarrell/autoheal
container_name: autoheal
restart: unless-stopped
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
games-net:
driver: bridge