Skip to content

Commit

Permalink
docs: shuffle docs around
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jul 15, 2024
1 parent 84bca9d commit 46ee10a
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ If you'd prefer to configure your server using [Docker Compose](https://docs.doc

To customize the server client further, please check out the following advanced setup guides.

- [Server Configs and Plugins](docs/SERVER_CONFIGS_AND_PLUGINS.md)
- [Custom Mods](docs/CUSTOM_MODS.md)
- [Building a Custom Image](docs/BUILDING_AN_IMAGE.md)
- [Server Configs and Plugins](config/README.md)
- [Custom Mods](mods/README.md)
- [Building a Custom Image](container/README.md)
22 changes: 21 additions & 1 deletion config/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
For details on how to use this directory refer to the Server Configuration section of the README.
# Configs and Plugins

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 you're starting the container for. 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.

```
├── 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` that lives alongside where you would typically start the server process. If you've cloned this project locally, you'd place them alongside this README file.
2. Add your config files to the directory.
3. Start the image as you normally 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).
8 changes: 4 additions & 4 deletions docs/BUILDING_AN_IMAGE.md → container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Before continuing to the following steps, verify that the environment variable i
> - `dod` ([Day of Defeat](https://store.steampowered.com/app/30/Day_of_Defeat/))
> - `tfc` ([Team Fortress Classic](https://store.steampowered.com/app/20/Team_Fortress_Classic/))
3. Build the image.
3. Navigate to the `container` folder (where this README file is) and build the image.

```sh
docker compose -f docker-compose.build.yml build
docker compose build
```

4. If you want to modify the server startup arguments, you can provide a `command` property within `docker-compose.build.yml`; [for a list of available arguments, visit the Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server).
4. If you want to modify the server startup arguments, you can provide a `command` property within `docker-compose.yml`; [for a list of available arguments, visit the Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server).

> [!NOTE]
> In most cases, you'll need to specify `+map` for the server to be joinable.
Expand All @@ -43,7 +43,7 @@ services:
5. Start the image. Once the Half-Life Dedicated Server client starts, you'll receive a stream of messages, including the server's public IP address and any startup errors.
```bash
docker compose -f docker-compose.build.yml up
docker compose up
```

6. Connect to your server via the public IP address by loading the game on [Steam](https://store.steampowered.com/). To play, you must own a copy of the game on Steam.
Expand Down
22 changes: 21 additions & 1 deletion container/config/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
For details on how to use this directory refer to the Server Configuration section of the README.
# Configs and Plugins

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 you're starting the container for. 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.

```
├── 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` that lives alongside where you would typically start the server process. If you've cloned this project locally, you'd place them alongside this README file.
2. Add your config files to the directory.
3. Start the image as you normally 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).
20 changes: 18 additions & 2 deletions docs/CUSTOM_MODS.md → container/mods/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# Custom Mods

If you want to run a custom mod, you can do so with the `mods` directory.
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, you wanted to add a mod named `decay`, you'd place it as a sub folder here, ie `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` that lives alongside where you would normally start the server process.
1. Create a folder called `mods` that lives alongside where you would normally start the server process. If you've cloned this project locally, you'd place them 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.

Expand Down
17 changes: 0 additions & 17 deletions docs/SERVER_CONFIGS_AND_PLUGINS.md

This file was deleted.

36 changes: 35 additions & 1 deletion mods/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
For details on how to use this directory refer to the Server Configuration section of the README.
# Custom Mods

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, you wanted to add a mod named `decay`, you'd place it as a sub folder here, ie `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` that lives alongside where you would normally start the server process. If you've cloned this project locally, you'd place them 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 normally 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` image (`jives/hlds:valve`), but this ultimately depends on the mod.

0 comments on commit 46ee10a

Please sign in to comment.