-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 Add default server command for game
- Loading branch information
Showing
5 changed files
with
29 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,38 @@ | ||
# Half-Life Dedicated Server Docker | ||
# Half-Life Dedicated Server With Docker | ||
|
||
Initializes a Half-Life Dedicated Server. | ||
Creates a Half-Life Dedicated Server instance using Docker. You can configure the server client however you'd like, and for any official games that are supported by the GoldSrc Dedicated Server client. | ||
|
||
## Setp | ||
## Setup | ||
|
||
1. Define the mod you wish to build. | ||
Ensure you have the [Docker daemon installed and running](https://www.docker.com/). | ||
|
||
```bash | ||
export MOD=cstrike | ||
> [!IMPORTANT] | ||
> The following steps will not work if you're using a system running on ARM or Mac Silicone architecture. | ||
1. Define the game you want to start the server for, and set it in the `GAME` section of `docker-compose.yml`. | ||
|
||
```yml | ||
services: | ||
hlds: | ||
environment: | ||
game: "cstrike" | ||
``` | ||
2. Build the image | ||
> [!IMPORTANT] | ||
> Possible options include Half-Life Deathmatch (`valve`), Counter-Strike (`cstrike`), Counter-Strike Condition Zero (`czero`), Deathmatch Classic (`dmc`), Opposing Force (`gearbox`), Ricochet (`ricochet`), Day of Defeat (`dod`), and Team Fortress Classic (`tfc`). | ||
|
||
2. Build the image. | ||
|
||
```sh | ||
docker compose build | ||
``` | ||
|
||
3. Start the image | ||
3. Start the image. | ||
|
||
```sh | ||
docker compose up | ||
``` | ||
|
||
## Configs | ||
## Server Configuration | ||
|
||
If you wish to define server configurations, such as addons, motd, server configs, etc, add them to the `config` directory. These will be volume mapped into the container on startup. | ||
If you wish to define server configurations, such as addons, plugins, custom message of the days, map rotations, etc, you can add them to the `config` directory. These will be copied into the container on startup of your server. |
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,2 +1,5 @@ | ||
// Defines the default configuration for the server | ||
// This file is executed automatically when the server starts | ||
// Docs: https://developer.valvesoftware.com/ | ||
|
||
hostname "The Coffee House" |
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ fi | |
|
||
echo Starting Half-Life Dedicated Server... | ||
|
||
./hlds_run "-game ${GAME} $@" | ||
./hlds_run "$@" |