add WorkshopDL support

This commit is contained in:
Lars Olzem 2020-06-06 18:42:20 +02:00
parent 0b7138e1f3
commit 2252753d07
No known key found for this signature in database
GPG Key ID: 358CF5698DDD556E
2 changed files with 14 additions and 4 deletions

View File

@ -16,8 +16,11 @@ ENV \
# http://steamcommunity.com/dev/managegameservers
GLST="" \
#
# Workshop (require API)
WORKSHOPCOLLECTIONID="" \
# Workshop server download (require API)
WORKSHOP="\${WORKSHOPCOLLECTIONID:-}" \
#
# Workshop client download (require API)
WORKSHOPDL="" \
#
# Server config
GAME="garrysmod" \
@ -35,7 +38,7 @@ ENV \
-tickrate \${TICKRATE} \
-maxplayers \${MAXPLAYERS} \
-authkey \${AUTHKEY} \
+host_workshop_collection \${WORKSHOPCOLLECTIONID} \
+host_workshop_collection \${WORKSHOP} \
+gamemode \${GAMEMODE} \
+map \${MAP} \
+servercfgfile \${CONFIG} \

View File

@ -67,7 +67,8 @@ docker run -it \
-e "AUTHKEY=..." \
-e "GAMEMODE=terrortown" \
-e "MAP=ttt_minecraft_b5" \
-e "WORKSHOPCOLLECTIONID=843519054" \
-e "WORKSHOP=843519054" \
-e "WORKSHOPDL=843519054" \
-v ./server.cfg:/opt/steam/garrysmod/cfg/server.cfg \
hackebein/garrysmod
```
@ -94,6 +95,12 @@ MAXPLAYERS: Max players
CUSTOMPARAMETERS: additional parameters
(`Default: `)
WORKSHOP: downloads workshop collection for server
(`Default: `)
WORKSHOPDL: downloads workshop collection for client before joining
(`Default: `)
## More Options
You can found more configuration options on the parent image page [hackebein/srcds](https://hub.docker.com/r/hackebein/srcds)