From e9c284be624e1c325a72a331999ceed96c2e91fb Mon Sep 17 00:00:00 2001 From: Astra Date: Thu, 3 Apr 2025 07:05:10 +0100 Subject: [PATCH] Change README.md --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 484c1aa..ea2efa5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,25 @@ This Docker image contains the dedicated server of the game. Running on the *host* interface (recommended):
```console -$ docker run -d --net=host --name=cs2 -e STEAMUSER={YOUR_STEAM_USER} -e STEAMPASS={YOUR_STEAM_PASSWD} git.zio.sh/astra/cs2:latest +$ docker run -d --net=host --name=cs2 --env-file=.cs2.env git.zio.sh/astra/cs2:latest +``` + +.cs2.env: +```properties +CS2_IP= +CS2_PORT=27015 +CS2_SERVERNAME=cs2.host.eu +CS2_RCONPW=changeme +CS2_PW=changeme +CS2_BOT_DIFFICULTY=1 +CS2_BOT_QUOTA=0 +CS2_SERVER_HIBERNAME=0 +CS2_MAXPLAYERS=36 +CS2_CHEATS=0 +CS2_GAMEALIAS=custom +SRCDS_TOKEN=changeme +STEAMAPPVALIDATE=0 +TV_ENABLE=0 ``` Running using a bind mount for data persistence on container recreation: @@ -20,15 +38,10 @@ $ docker run -d \ --net=host \ -v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ \ --name=cs2-dedicated \ - -e STEAMUSER= \ - -e STEAMPASS= \ + --env-file=.cs2.properties \ git.zio.sh/astra/cs2:latest ``` -`STEAMUSER` and `STEAMPASS` **are required as unlike CS:GO, CS2 can not be downloaded anonymously (at time of writing).** - -`STEAMGUARD` **must be used to provide your more recent Steam Guard key if Steam Guard is enabled on your account.** - **The container will automatically update the game on startup, so if there is a game update just restart the container.** # Configuration @@ -39,14 +52,6 @@ Please note that you need approximately 1.5g of free RAM. If this is not availab ## Environment Variables Feel free to overwrite these environment variables, using -e (--env) or --env-file (recommended): -### SteamCMD - -```dockerfile -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 ```dockerfile