From 3ffbc57e280f26a8d00811ce9bac6bc9c194a20e Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Sun, 21 Apr 2024 22:38:22 +0000 Subject: [PATCH] Docs (readme): Add documentation on Source 2 games --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a9ac33c..43a757d0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Dedicated servers hosted on Steam are usually required to be running the *latest [hlds-dockerhub-badge]: https://img.shields.io/badge/docker-goldsourceservers-blue.svg?logo=docker&logoColor=FFFFFF&color=FF6917&label=&labelColor=&style=popout-square [hlds-dockerhub-link]: https://hub.docker.com/u/goldsourceservers -### Source Engine (SRCDS) +### Source 2 / Source Engine (SRCDS) | Game | Image | Tag `v` | Size | Status | |:-:|:-:|:-:|:-:|:-:| @@ -302,7 +302,7 @@ The game images **do not** include support for configuring game instances via en Docker images are often packaged with applications designed to comply with [twelve-factor methodology - Config](https://12factor.net/config) where environment variables are read directly as configuration by the application, a case in point being the [Docker Registry](https://docs.docker.com/registry/configuration/#override-specific-configuration-options). Some applications however do not read environment variables as configuration but instead accept command line arguments or read from config files wherein it is common for their docker images to include an entrypoint script which maps environment variables onto command line arguments for invocation. -Source and Goldsource games belong to the group of applications that do not read from environment variables but that are instead configured via parameters (i.e. flags beginning with `-`, e.g. `-usercon`, see [SRCDS parameters](https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-Line_Parameters_6) and [HLDS parameters](https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-Line_Parameters_7)), as well as Cvars (i.e. flags beginning with `+`, e.g. `+sv_lan 0`, see [SRCDS console variables](https://developer.valvesoftware.com/wiki/Command_Line_Options#Console_Variables_2) and [HLDS console variables](https://developer.valvesoftware.com/wiki/Command_Line_Options#Useful_Console_Variables_2)). Although there are many Cvars shared across SRCDS and HLDS games, there are also Cvars that are game-specific (e.g. the many hundreds for `left4dead` and `left4dead2`), as well as mod/plugin-specific (e.g. `sourcemod`, `amxmodx`). +Source 2, Source, and Goldsource games belong to the group of applications that do not read from environment variables but that are instead configured via parameters (i.e. flags beginning with `-`, e.g. `-usercon`, see [Source 2 parameters](https://developer.valvesoftware.com/wiki/Command_line_options#Command-Line_Parameters_3) / [SRCDS parameters](https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-Line_Parameters_6) and [HLDS parameters](https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-Line_Parameters_7)), as well as Cvars (i.e. flags beginning with `+`, e.g. `+sv_lan 0`, see [SRCDS console variables](https://developer.valvesoftware.com/wiki/Command_Line_Options#Console_Variables_2) and [HLDS console variables](https://developer.valvesoftware.com/wiki/Command_line_options#Useful_Console_Variables_2)). Although there are many Cvars shared across SRCDS and HLDS games, there are also Cvars that are game-specific (e.g. the many hundreds for `left4dead` and `left4dead2`), as well as mod/plugin-specific (e.g. `sourcemod`, `amxmodx`). Because of the many parameters and Cvars that exist for each game and mod/plugin setup, it does not make sense to map them directly to environment variables for several reasons: First, doing so introduces an unnecessary layer of abstraction which operators would have to learn on top of the numerous available parameters and Cvars. Second, a single change to any envvar-cvar mapping will require a rebuild of the docker image to contain the new `docker-entrypoint.sh` script, introducing a lot of unnecessary builds. Third, the very `docker-entrypoint.sh` script providing the envvar-cvar mapping would also require versioning, introducing yet another burden on top of just keeping the images updated. @@ -318,6 +318,12 @@ Operators who wish to run the game servers under a non-root user can customize t ### Invocation via wrapper script vs binary +#### Source 2 + +Newly launched games such as `Counter-Strike 2` include only the game binary for invocation. + +#### Source / Goldsource + The official games from Valve come with a wrapper script and a binary as part of the game files, both of which reside in the game's root directory. The wrapper script, commonly used in non-containerized setups: