services: ProjectZomboidDedicatedServer: image: danixu86/project-zomboid-dedicated-server:latest restart: unless-stopped # On SIGTERM the entrypoint sends `quit` to the server console and waits for the world # to be saved. Docker's default grace period is 10s, which is not enough for a large # world and would SIGKILL the server mid-save. stop_grace_period: 120s build: context: . dockerfile: Dockerfile args: # Reads STEAMAPPBRANCH from your .env file to set the build version (ARG). - STEAMAPPBRANCH=${STEAMAPPBRANCH} # Extra locales to generate in the image, so they can be selected with LANG. - EXTRA_LOCALES=${EXTRA_LOCALES:-es_ES.UTF-8} env_file: - .env ports: # Follow the PORT and UDPPORT variables from the .env file. With the ports hardcoded, # changing them left the server listening on a port that was never published, so it # was unreachable from outside the container. - "${PORT:-16261}:${PORT:-16261}/udp" - "${UDPPORT:-16262}:${UDPPORT:-16262}/udp" - "27015:27015/tcp" volumes: # Server data - ${PROJECT_ZOMBOID_DATA:-./data}:/home/steam/Zomboid # Workshop mods folder - ${PROJECT_ZOMBOID_WORKSHOP_MODS:-./workshop-mods}:/home/steam/pz-dedicated/steamapps/workshop