3.0 KiB
3.0 KiB
docker-ttt
Garry's mod, gamemode TTT as docker image: https://hub.docker.com/r/jusito/
Getting Started
- Create 2 workshop collections. One containing Maps and a subcollection. Subcollection containing all non-map elements.
- Do you want forced auto download? If no go 3., if yes use
-e WORKSHOP_COLLECTION_ID=*SubCollectionID*
. - Let Gmod server know which collection should be used.
[...]jusito/docker-ttt:beta +host_workshop_collection *MainCollectionID* [...]
- Do you want CSS or other game content installed and mounted(CSS recommended)? If no go 5., if yes
-e INSTALL_CSS=true
or see environment variables. - Choose your ports. Default is 27015.
docker run [...] -p 27015:27015/tcp jusito/docker-ttt:beta -port 27015 [...]
run example
docker run -dit -p 27015:27015/tcp -p 27015:27015/udp -e WORKSHOP_COLLECTION_ID=123456 -e INSTALL_CSS=true "jusito/docker-ttt:beta" -port 27015 +host_workshop_collection 123456 +map ttt_rooftops_2016_v1 -maxplayers 16
- -it needed for seeing all output if attached
- 27015/tcp(optional) - rcon port, you will need this too: -usercon +rcon_password "yourPW"
- 27015/udp - udp port for game traffic
- -port 27015 - only needed if you want to use non-default port, docker -p 27016:27015 will not work.
- -e WORKSHOP_COLLECTION_ID(optional) - add every element to forced
- -e INSTALL_CSS(optional) - download CSS and mount it
- +host_workshop_collection - Garry's Mod will load this collection
- +map(optional) - default map to start
- -maxplayers(optional) - max count of players
whats missing, why tag beta:
- cron service needs to be started otherwise the server will get only updates on restart
- force cleanup of downloaded elements => removed workshop elements are otherwise used
- I failed to create a proper volume, mount /home/steam/serverfiles.
environment variables
Variable | Default | Description | Example |
---|---|---|---|
WORKSHOP_COLLECTION_ID | ""(empty) | Every element on this list is set to forced download. The users don't need to subscribe to your collection. Don't add maps here, they are already forced by default. | 1358835428 |
SERVER_NAME | ""(empty) | overwrite server.cfg value | "[TTT] dockerized" |
SERVER_PASSWORD | ""(empty) | overwrite server.cfg value | "SecurePW" |
SERVER_VOICE_ENABLE | 1 | overwrite server.cfg value | 0 (disabling ingame voice) |
INSTALL_CSS | false | Install & Mount CSS. Most of the time you will set this to true. | true |
INSTALL_HL2 | false | Install & Mount HL2. | true |
INSTALL_HLDM | false | Install & Mount HLDM. | true |
INSTALL_TF2 | false | Install & Mount TF2. | true |
server config
Additional
- Attach to console after start,
docker exec -it _CONTAINER_ /home/steam/gmodserver console
- Copy your server.cfg in,
docker cp "your server.cfg path" CONTAINER:/home/steam/serverfiles/garrysmod/cfg/server.cfg