From f4104eedab9fbeb1ebe85526b7f30591828c2be8 Mon Sep 17 00:00:00 2001 From: John Edwards Date: Mon, 23 Oct 2023 13:25:58 +0100 Subject: [PATCH] Updated sample docker compose file and clarified readme --- README.md | 5 ++-- {bullseye => examples}/docker-compose.yml | 34 +++++++++++------------ 2 files changed, 20 insertions(+), 19 deletions(-) rename {bullseye => examples}/docker-compose.yml (56%) diff --git a/README.md b/README.md index 3293646..1abd23a 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,10 @@ $ chmod 777 $(pwd)/cs2-data # Makes sure the directory is writeable by the unpri $ docker run -d --net=host -v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ --name=cs2-dedicated -e STEAMUSER={YOUR_STEAM_USER} -e STEAMPASS={YOUR_STEAM_PASSWD} joedwards32/cs2 ``` -or using docker-compose: +or using docker-compose, see [examples](https://github.com/joedwards32/CS2/blob/main/examples/docker-compose.yml): ```console -$ docker-compose up -d +# Remember to update passwords in your compose file +$ docker compose --file examples/docker-compose.yml up -d cs2-server ``` Remember about having at least **40GB** of free disk space! diff --git a/bullseye/docker-compose.yml b/examples/docker-compose.yml similarity index 56% rename from bullseye/docker-compose.yml rename to examples/docker-compose.yml index 6054e78..894e81b 100644 --- a/bullseye/docker-compose.yml +++ b/examples/docker-compose.yml @@ -5,33 +5,33 @@ services: container_name: cs2-dedicated environment: # SteamCMD - - STEAMUSER="changeme" # (Steam User for SteamCMD.) - - STEAMPASS="changeme" # (Password for Steam User.) - - STEAMGUARD="" # (Optional, Steam Guard key if enabled. Use your most recent Steam Guard key.) + - STEAMUSER=changeme # (Steam User for SteamCMD.) + - STEAMPASS=changeme # (Password for Steam User.) + - STEAMGUARD # (Optional, Steam Guard key if enabled. Use your most recent Steam Guard key.) # Server configuration - - CS2_SERVERNAME="changeme" # (Set the visible name for your private server) + - CS2_SERVERNAME=changeme # (Set the visible name for your private server) - CS2_IP=0.0.0.0 # (CS2 server listening IP address, 0.0.0.0 - all IP addresses on the local machine, empty - IP identified automatically) - CS2_PORT=27015 # (CS2 server listen port tcp_udp) - - CS2_RCON_PORT="" # (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.) - - CS2_LAN="0" # (0 - LAN mode disabled, 1 - LAN Mode enabled) - - CS2_RCONPW="changeme" # (RCON password) - - CS2_PW="changeme" # (CS2 server password) + - CS2_RCON_PORT # (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.) + - CS2_LAN=0 # (0 - LAN mode disabled, 1 - LAN Mode enabled) + - CS2_RCONPW=changeme # (RCON password) + - CS2_PW=changeme # (CS2 server password) - CS2_MAXPLAYERS=10 # (Max players) - - CS2_ADDITIONAL_ARGS="" # (Optional additional arguments to pass into cs2) + - CS2_ADDITIONAL_ARGS # (Optional additional arguments to pass into cs2) # Game modes - - CS2_GAMEALIAS="" # (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers) + - CS2_GAMEALIAS # (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers) - CS2_GAMETYPE=0 # (Used if CS2_GAMEALIAS not defined. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers) - CS2_GAMEMODE=1 # (Used if CS2_GAMEALIAS not defined. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers) - - CS2_MAPGROUP="mg_active" # (Map pool) - - CS2_STARTMAP="de_inferno" # (Start map) + - CS2_MAPGROUP=mg_active # (Map pool) + - CS2_STARTMAP=de_inferno # (Start map) # Bots - - CS2_BOT_DIFFICULTY="" # (0 - easy, 1 - normal, 2 - hard, 3 - expert) - - CS2_BOT_QUOTA="" # (Number of bots) - - CS2_BOT_QUOTA_MODE="" # (fill, competitive) + - CS2_BOT_DIFFICULTY # (0 - easy, 1 - normal, 2 - hard, 3 - expert) + - CS2_BOT_QUOTA # (Number of bots) + - CS2_BOT_QUOTA_MODE # (fill, competitive) volumes: - cs2:/home/steam/cs2-dedicated/ # (Change /mnt/cs2 according to your volume location) ports: - - "27015:27015" # TCP - - "27015:27015/udp" # UDP + - "27015:27015/tcp" # TCP + - "27015:27015/udp" # UDP volumes: cs2: