Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment script #5

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

MegaBrutal
Copy link

This modification adds a deployment script to the container which is capable to install archive files into either the game directory or the maps directory from permanent storage. The idea behind this is that many maps and other assets are distributed in archive files (typically ZIP) that you download from websites and then extract them to the server's directory. By time, the game directory gets cluttered with various content from various sources and because one package may install many assets (for example maps those use custom models, sprites, sounds, etc.), removing an addon may not be straightforward because you need to track down all of its individual files which may be cumbersome. This modification allows you to repopulate the game directory directly from the archive files each time you restart the container, and you can easily create a new container for a fresh start. In addition, the script automatically generates a mapcycle.txt from all the playable maps which you can easily override by specifying a different mapcycle file in server.cfg. Look at the modified README file and the commits themselves for usage.

NOTE: Unfortunately, SteamCMD currently needs a Steam account to properly download HLDS, it doesn't work with anonymous login anymore. I believe this is an error and I hope it'll get fixed by Valve. But this means that this container is unable to compose at this time and I have nothing to do about it. Well, I added a check for a proper HLDS install because without it, the build has completed like it was successful and then HLDS couldn't start. Still, by disabling this check, it is possible to test the deploy script; and with some local hacking it is also possible to build a working container, but it is not nice.

MegaBrutal and others added 16 commits October 10, 2021 02:48
Mention some other CVARs the server owner should care about (frag limit,
allow upload, logging, hints to customize mapcycle and motd).

Also correct mp_timeleft to mp_timelimit (timeleft is in seconds and seems
to be read-only, it's rather to query the actual time life while the round
is running) and a typo.
Attempt to update HLDS via SteamCMD before starting the server.

Deploy the contents of valve/config/deploy/gamedir into the valve
directory, which gives server owners the opportunity to install
additional assets (e.g. maps, models, mods) or overwrite existing
files without rebuilding the Docker image.
SteamCMD started to require it, not just nicely asking.
The deploy script now looks into two additional directories,
install-assets and install-maps, to find archive files to extract
into the game directory (valve) and maps directory (valve/maps)
respectively. Various archive formats are recognized and extracted
appropriately.

Also gamedir was renamed to copy-gamedir from where the script just
copies the files into gamedir.
As of today, the libstdc++.so.6 library is not shipped with HLDS anymore.
Meanwhile, this library was also removed from the debian:bookworm-slim image.
As a result, the libstdc++:i386 package needs to be installed via the Dockerfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant