Disable server hibernation by default as this has been observed to cause server crashes
This commit is contained in:
parent
30fb7aa77d
commit
7b65096143
5 changed files with 33 additions and 26 deletions
|
@ -51,6 +51,9 @@ Feel free to overwrite these environment variables, using -e (--env):
|
||||||
```dockerfile
|
```dockerfile
|
||||||
SRCDS_TOKEN="" (Game Server Token from https://steamcommunity.com/dev/managegameservers)
|
SRCDS_TOKEN="" (Game Server Token from https://steamcommunity.com/dev/managegameservers)
|
||||||
CS2_SERVERNAME="changeme" (Set the visible name for your private server)
|
CS2_SERVERNAME="changeme" (Set the visible name for your private server)
|
||||||
|
CS2_SERVER_HIBERNATE=0 (Put server in a low CPU state when there are no players.
|
||||||
|
0 - hibernation disabled, 1 - hibernation enabled
|
||||||
|
n.b. hibernation has been observed to trigger server crashes)
|
||||||
CS2_IP="" (CS2 server listening IP address, 0.0.0.0 - all IP addresses on the local machine, empty - IP identified automatically)
|
CS2_IP="" (CS2 server listening IP address, 0.0.0.0 - all IP addresses on the local machine, empty - IP identified automatically)
|
||||||
CS2_PORT=27015 (CS2 server listen port tcp_udp)
|
CS2_PORT=27015 (CS2 server listen port tcp_udp)
|
||||||
CS2_RCON_PORT="" (Optional, use a simple TCP proxy to have RCON listen on an alternative port.
|
CS2_RCON_PORT="" (Optional, use a simple TCP proxy to have RCON listen on an alternative port.
|
||||||
|
|
|
@ -40,6 +40,7 @@ FROM build_stage AS bullseye-base
|
||||||
|
|
||||||
ENV CS2_SERVERNAME="cs2 private server" \
|
ENV CS2_SERVERNAME="cs2 private server" \
|
||||||
CS2_IP=0.0.0.0 \
|
CS2_IP=0.0.0.0 \
|
||||||
|
CS2_SERVER_HIBERNATE=0 \
|
||||||
CS2_PORT=27015 \
|
CS2_PORT=27015 \
|
||||||
CS2_RCON_PORT="" \
|
CS2_RCON_PORT="" \
|
||||||
CS2_MAXPLAYERS=10 \
|
CS2_MAXPLAYERS=10 \
|
||||||
|
|
|
@ -34,6 +34,7 @@ fi
|
||||||
# Rewrite Config Files
|
# Rewrite Config Files
|
||||||
|
|
||||||
sed -i -e "s/{{SERVER_HOSTNAME}}/${CS2_SERVERNAME}/g" \
|
sed -i -e "s/{{SERVER_HOSTNAME}}/${CS2_SERVERNAME}/g" \
|
||||||
|
-e "s/{{SERVER_HIBERNATE}}/${CS2_SERVER_HIBERNATE}/g" \
|
||||||
-e "s/{{SERVER_PW}}/${CS2_PW}/g" \
|
-e "s/{{SERVER_PW}}/${CS2_PW}/g" \
|
||||||
-e "s/{{SERVER_RCON_PW}}/${CS2_RCONPW}/g" \
|
-e "s/{{SERVER_RCON_PW}}/${CS2_RCONPW}/g" \
|
||||||
-e "s/{{TV_ENABLE}}/${TV_ENABLE}/g" \
|
-e "s/{{TV_ENABLE}}/${TV_ENABLE}/g" \
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Server Defaults
|
// Server Defaults
|
||||||
|
|
||||||
hostname "{{SERVER_HOSTNAME}}" // Set server hostname
|
hostname "{{SERVER_HOSTNAME}}" // Set server hostname
|
||||||
|
sv_hibernate_when_empty {{SERVER_HIBERNATE}} // Disable server hibernation
|
||||||
|
|
||||||
// Passwords
|
// Passwords
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ sv_password "{{SERVER_PW}}" // Set server password
|
||||||
|
|
||||||
// CSTV
|
// CSTV
|
||||||
|
|
||||||
sv_hibernate_postgame_delay 180 // Delay server hibernation after all clients disconnect
|
sv_hibernate_postgame_delay 30 // Delay server hibernation after all clients disconnect
|
||||||
|
|
||||||
tv_allow_camera_man 1 // Auto director allows spectators to become camera man
|
tv_allow_camera_man 1 // Auto director allows spectators to become camera man
|
||||||
tv_allow_static_shots 1 // Auto director uses fixed level cameras for shots
|
tv_allow_static_shots 1 // Auto director uses fixed level cameras for shots
|
||||||
|
|
|
@ -8,6 +8,7 @@ services:
|
||||||
- SRCDS_TOKEN # Game Server Token from https://steamcommunity.com/dev/managegameservers
|
- SRCDS_TOKEN # Game Server Token from https://steamcommunity.com/dev/managegameservers
|
||||||
- CS2_SERVERNAME=changeme # (Set the visible name for your private server)
|
- CS2_SERVERNAME=changeme # (Set the visible name for your private server)
|
||||||
- CS2_PORT=27015 # (CS2 server listen port tcp_udp)
|
- CS2_PORT=27015 # (CS2 server listen port tcp_udp)
|
||||||
|
- CS2_SERVER_HIBERNATE=0 # (Put server in a low CPU state when there are no players. 0 - hibernation disabled, 1 - hibernation enabled)
|
||||||
- CS2_RCON_PORT # (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.)
|
- CS2_RCON_PORT # (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.)
|
||||||
- CS2_LAN=0 # (0 - LAN mode disabled, 1 - LAN Mode enabled)
|
- CS2_LAN=0 # (0 - LAN mode disabled, 1 - LAN Mode enabled)
|
||||||
- CS2_RCONPW=changeme # (RCON password)
|
- CS2_RCONPW=changeme # (RCON password)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue