valheim-server-docker
valheim-server-docker copied to clipboard
copy / sync patchers directory of bepinex, too
in the "common" file is a block which copies the plugins directory into the corresponding plugins directory of the docker container.
please do the same for the bepinex/patchers folder, this way we can configure and update patchers like the HookGenPatcher
At the moment I worked around that with a
PRE_START_HOOK="rsync -a --delete /config/hookgenpatcher/patchers /opt/valheim/bepinex/BepInEx && rsync -a /config/hookgenpatcher/config/ /config/bepinex"
and a additional read only volume at /config/hookgenpatcher
Has to be proven with the next update, but seems to work.
I'd like to add my request for this here as well. @m-lindemann, is your solution still working? Do you have an example of what the docker compose looks like for your mount? Thanks
Looks like you could define the variables and just add
if [ -d "$config_path/patchers" ] && [ -d "$patchers_path" ]; then
info "Syncing BepInEx patchers from $config_path/patchers/ -> $patchers_path"
rsync -a --itemize-changes "$config_path/patchers/" "$patchers_path"
fi
Right below the plugins block. On mobile and need to sleep so I'll mess with it after my meeting in the AM.
In the meantime @m-lindemann it looks like you're using only bepinex, could you assist with what your command would look like for valheim plus? I'm assuming:
PRE_START_HOOK="rsync --delete /config/valheimplus/patchers /opt/valheim/plus/BepInEx && rsync -a /config/valheimplus/config/ /config/plus"
but not entirely sure thats correct. If you could help with a step by step that would be great. Not super familiar with rsync yet.
I'd like to add my request for this here as well. @m-lindemann, is your solution still working? Do you have an example of what the docker compose looks like for your mount? Thanks
I´m not using docker-compose for that. But
volumes:
- $HOME/valheim-server/config:/config
- $HOME/valheim-server/data:/opt/valheim
- $HOME/valheim-server/hookgenpatcher:/config/hookgenpatcher:ro
should do the job.
In the meantime @m-lindemann it looks like you're using only bepinex, could you assist with what your command would look like for valheim plus? I'm assuming:
PRE_START_HOOK="rsync --delete /config/valheimplus/patchers /opt/valheim/plus/BepInEx && rsync -a /config/valheimplus/config/ /config/plus"
but not entirely sure thats correct. If you could help with a step by step that would be great. Not super familiar with rsync yet.
Sorry, never tried that on Valheim Plus. And I'm also on a very very low level with rsync. Just doing try and error...
@m-lindemann I'm trying to implement your workaround with no luck, so Im hoping to clarify some things. Ive passed in the shared folder to the container and your PRE_START_HOOK string as an environment variable. Is this how you configured yours?
volumes: - $HOME/valheim/config:/config - $HOME/valheim/data:/opt/valheim - $HOME/valheim/config/bepinex/patchers:/config/hookgenpatcher:ro
environment: - PRE_START_HOOK="rsync -a --delete /config/hookgenpatcher/patchers /opt/valheim/bepinex/BepInEx && rsync -a /config/hookgenpatcher/config/ /config/bepinex"
Hello, this rsync will not work in Kubernetes setup
Currently is there a way to inject addons from Thunderstore by supplying a list from configuration file and get updated by night cron ? If there is interest in this feature, I'll make PR.