Skip to content

Commit

Permalink
feat: ✨ Improve mod support
Browse files Browse the repository at this point in the history
commit 209ed7e
Author: James Ives <[email protected]>
Date:   Thu Jun 13 15:39:04 2024 -0400

    fix: adjust config setup

commit de43f06
Author: James Ives <[email protected]>
Date:   Thu Jun 13 15:30:14 2024 -0400

    Update docker-compose.yml

commit 539b06d
Author: James Ives <[email protected]>
Date:   Thu Jun 13 15:27:09 2024 -0400

    Update entrypoint.sh

commit d6ffabc
Author: James Ives <[email protected]>
Date:   Thu Jun 13 15:07:15 2024 -0400

    test

commit db61cc5
Author: James Ives <[email protected]>
Date:   Thu Jun 13 14:41:19 2024 -0400

    Update entrypoint.sh
  • Loading branch information
JamesIves committed Jun 13, 2024
1 parent 394d437 commit 384d5e6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
configs/*
config/*
mods/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If you want to run a custom mod, you can do so with the `mods` directory. Simila
export GAME=decay
```

3. Build the image.
3. Build the image. If you don't want to build the image, I suggest using the `jives/hlds:valve` image.

```bash
docker compose build
Expand Down
5 changes: 0 additions & 5 deletions config/default.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
// Defines the default configuration for the server
// This file is executed automatically when the server starts
// Docs: https://developer.valvesoftware.com/

hostname "Half-Life Dedicated Server"
4 changes: 1 addition & 3 deletions config/motd.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Welcome

Server built with hlds-docker: https://github.com/JamesIves/hlds-docker
Welcome! Server built with hlds-docker: https://github.com/JamesIves/hlds-docker
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ services:
args:
GAME: ${GAME}
volumes:
- "./config:/config"
- "./mods:/mods"
- "./config:/temp/config"
- "./mods:/temp/mods"
ports:
- "27015:27015/udp"
- "27015:27015"
- "26900:2690/udp"
command: +maxplayers 12 +log on
10 changes: 10 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ if echo "$@" | grep -qv "+map"; then
echo -e "\e[33mWarning: No +map specified in the command. Server will start but may not be joinable.\e[0m"
fi

if [ -d /temp/config ]
then
rsync --chown=steam:steam /temp/config/* /opt/steam/hlds/$GAME
fi

if [ -d /temp/mods ]
then
rsync --chown=steam:steam /temp/mods/* /opt/steam/hlds
fi

echo -e "\e[32mStarting Half-Life Dedicated Server...\e[0m"

./hlds_run "-game $GAME $@"

0 comments on commit 384d5e6

Please sign in to comment.