lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.94k stars 272 forks source link

[Updater] Add option to remove "validate" from steamcmd command #23

Closed wedol closed 3 years ago

wedol commented 3 years ago

I'm trying and experimenting with server binaries to reduce cpu usage while nobody is online, but every update check validates and redownloads modified binaries, but i also want auto update if new version of valheim server is released. Would be awesome to disable "validate" from steamcmd command (new ENV variable?)

EugenMayer commented 3 years ago

I think there is more to it.

Right now the server starts in a cascade with supervisor, so update run first, then it starts the server.

I think this is best for consistency, up to date and avoiding issues in general. But on lower spec hardware this leads to a very high delay in the startup, no matter if the server has been started before, it takes about 15 Minutes to start it due to the pure validate step of the game.

So i would maybe make the update process more of a

For this purpose i would use 2 supervisorctl apps, one for the autoupdates with the SKIP_AUTOUPDATES flag, which then starts the server after the update. That's the autostart one.

The second, autostart=false / autorestart=false is just an manual updater, restarting the server app if it was not an noop.

In the docs we can write something like: to manually update run docker exec vallheim supervisorctl start manual_update

I can help implementing this if desired

lloesche commented 3 years ago

@wedol I introduced a new env variable STEAMCMD_ARGS which is validate by default. If you set it to an empty string then steamcmd won't validate. Also allows you to add any other args that might be useful.

@EugenMayer if you volume mount /opt/valheim_dl it won't download the server on every start. Also, 15 minutes just to validate seem like an extraordinarily long time. In my dev environment, which is Docker in a WSL2 VM on Windows on a Laptop on Wifi - so about as bad as I can imagine 😄 - a fresh start which includes downloading the 1GB server binaries from Steam takes 1m50.536s and a validate is performed in 0m8.699s. What type of system are you running the container on?