-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
MegaBrutal
wants to merge
16
commits into
spezifanta:master
Choose a base branch
from
MegaBrutal:merge-deploy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.