# CS 1.6 deathmatch server. Settings: .env (see .env.example). Setup: ./setup.sh # Game: UDP ${CS_PORT} on all interfaces (network_mode host, so no port mapping needed). services: cs: build: . image: cs16-dm-server:local container_name: ${CS_NAME:-cs16} user: "${CS_UID:-1000}:${CS_GID:-1000}" network_mode: host restart: unless-stopped init: true # tini as PID 1: if hlds crashes the container exits and Docker restarts it ulimits: core: 0 # a crash would otherwise write a ~170 MB core file logging: # cap docker logs (console output grows forever) driver: json-file options: max-size: "10m" max-file: "3" stdin_open: true tty: true env_file: .env environment: - HOME=/cs/steamcmd-home volumes: - ./hlds:/cs/hlds - ./steamcmd-home:/cs/steamcmd-home - ./secrets:/cs/secrets:ro - ./tools:/cs/tools:ro # start.sh writes .env values into the game configs, then runs hlds_run # (-norestart: on a crash the container exits and Docker's restart policy takes over). command: ["/bin/sh", "/cs/tools/start.sh"]