-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: π§ͺ Add unit tests to validate directory mapping and existence ofβ¦
β¦ game folder (#49) #minor
- Loading branch information
Showing
8 changed files
with
147 additions
and
69 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
# Configs and Plugins | ||
|
||
> [!WARNING] | ||
> Configs added here will be included in the distributed image. This means users must override them on startup when using a distributed version. | ||
If you wish to add server configurations, such as add-ons, plugins, map rotations, etc, you can add them to theΒ `config` directory. The `config` directory is volume-mapped within the directory for the game for which you're starting the container. For example, if you're starting a container for `cstrike`, you can add things like `mapcycle.txt` or `motd.txt` here, and it would appear within the corresponding `cstrike` directory on the server. | ||
|
||
> [!NOTE] | ||
> The startup examples posted in the project README already have this directory volume mapped accordingly. If you've strayed from the suggested setup, [please refer back to it to get started](../../README.md). | ||
``` | ||
βββ hlds | ||
β βββ cstrike | ||
β β βββ models | ||
β β βββ maps | ||
β β βββ mapcycle.txt | ||
β β βββ motd.txt | ||
``` | ||
|
||
> [!TIP] | ||
> You can use this method to install server plugins such as AMX Mod, Meta Mod, etc., as the directory can handle nested folders too; for example, these can be placed in `config/addons/amxmodx` etc. | ||
1. Create a folder called `config` alongside where you would typically start the server process. If you've cloned this project locally, you'd place it alongside this README file. | ||
2. Add your config files to the directory. | ||
3. Start the image as you usually would, either with `docker run` or `docker compose up`. | ||
|
||
For a list of all the available server configuration types, [refer to the Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Main_Page). | ||
[For setup instructions, please refer to the following README](../../config/README.md). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,3 @@ | ||
# Custom Mods | ||
|
||
> [!WARNING] | ||
> Mods added here will be included in the distributed image. This means users must override them on startup when using a distributed version. | ||
If you want to run a custom mod, you can do so with the `mods` directory. The `mods` directory is volume mapped within the root directory of the Half-Life Dedicated Server client on startup. For example, if you wanted to add a mod named `decay`, you'd place it as a subfolder here, i.e., `mods/decay`. Once the container starts, it would be placed in the following directory. | ||
|
||
``` | ||
βββ hlds | ||
β βββ cstrike | ||
β β βββ models | ||
β β βββ maps | ||
β β βββ autoexec.cfg | ||
β βββ valve | ||
β β βββ models | ||
β β βββ maps | ||
β β βββ autoexec.cfg | ||
β βββ decay | ||
β β βββ models | ||
β β βββ maps | ||
β β βββ autoexec.cfg | ||
``` | ||
|
||
> [!NOTE] | ||
> The startup examples posted in the project README already have this directory volume mapped accordingly. If you've strayed from the suggested setup, [please refer back to it to get started](../README.md). | ||
1. Create a folder called `mods` alongside where you would normally start the server process. If you've cloned this project locally, you'd place it alongside this README file. | ||
2. Add your mod files as a sub-directory of `mods`. For example if the mod name is `decay`, you'd place it in `mods/decay`. | ||
3. Define the `GAME` environment variable for your mod name. The dedicated server client will use this to ensure that it starts a server for the correct mod, which corresponds with the directory name that was just created. | ||
|
||
```bash | ||
export GAME=decay | ||
``` | ||
|
||
4. Start the image as you usually would, either with `docker run` or `docker compose up`. Most Half-Life mods require specific startup arguments. For more details, refer to the [Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server) and the instructions for the mod you're trying to run. | ||
|
||
> [!TIP] | ||
> When using a pre-built image, you'll likely want to use the `valve` base image (`jives/hlds:valve`). | ||
[For setup instructions, please refer to the following README](../../mods/README.md). |
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