diff --git a/README.md b/README.md index e6d2f57..8b475b3 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Feel free to overwrite these environment variables, using -e (--env): ### Server Configuration ```dockerfile -SRCDS_TOKEN="" Game Server Token from https://steamcommunity.com/dev/managegameservers +SRCDS_TOKEN="" (Game Server Token from https://steamcommunity.com/dev/managegameservers) CS2_SERVERNAME="changeme" (Set the visible name for your private server) CS2_IP="" (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) @@ -106,6 +106,29 @@ The container includes two scripts for executing custom actions: When using a persient volume mounted at `/home/steam/cs2-dedicated/` you may edit these scripts to perform custom actions, such as enabling metamod. +## Overriding Game Mode Defaults + +The default configurations for each game mode are stored in `/home/steam/cs2-dedicated/csgo/cfg/`. For example, the Competitive mode defaults are set by `gamemode_competitive.cfg`. + +When using a persistent volume mounted at `/home/steam/cs2-dedicated/`, these defaults can be overridden by adding your own settings to `gamemode_competitive_server.cfg`. + +``` +// Game Mode Competitive Server Overrides + +mp_maxrounds 16 // Shorter games +``` + +## Customisation Bundle + +The container can be instructed to download a extract a Tar Gzip of configuration files and other customisations from a given URL. + +```dockerfile +CS2_CFG_URL="" (HTTP/HTTPS URL to fetch a Tar Gzip bundle of configuration files/mods) +``` + +See [examples](https://github.com/joedwards32/CS2/blob/main/examples/cs2.cfg.tgz) for a correctly formatted Tar Gzip customisation bundle. + + # Credits This container leans heavily on the work of [CM2Walki](https://github.com/CM2Walki/), especially his [SteamCMD](https://github.com/CM2Walki/steamcmd) container image. GG! diff --git a/bullseye/etc/entry.sh b/bullseye/etc/entry.sh index 741dda1..d4c977a 100644 --- a/bullseye/etc/entry.sh +++ b/bullseye/etc/entry.sh @@ -17,7 +17,7 @@ ln -sfT ${STEAMCMDDIR}/linux64/steamclient.so ~/.steam/sdk64/steamclient.so # Install server.cfg cp /etc/server.cfg "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg -# Install hooks +# Install hooks if they don't already exist if [[ ! -f "${STEAMAPPDIR}/pre.sh" ]] ; then cp /etc/pre.sh "${STEAMAPPDIR}/pre.sh" fi @@ -27,6 +27,7 @@ fi # Download and extract custom config bundle if [[ ! -z $CS2_CFG_URL ]]; then + echo "Downloading config pack from ${CS2_CFG_URL}" wget -qO- "${CS2_CFG_URL}" | tar xvzf - -C "${STEAMAPPDIR}" fi @@ -87,6 +88,7 @@ if [[ ! -z $CS2_RCON_PORT ]]; then simpleproxy -L "${CS2_RCON_PORT}" -R 127.0.0.1:"${CS2_PORT}" & fi +echo "Starting CS2 Dedicated Server" eval "./cs2" -dedicated \ "${CS2_IP_ARGS}" -port "${CS2_PORT}" \ -console \ diff --git a/examples/cs2.cfg.tgz b/examples/cs2.cfg.tgz new file mode 100644 index 0000000..7807d7f Binary files /dev/null and b/examples/cs2.cfg.tgz differ