When the server starts up, the image will ignore the World details that are defined in Environment Variables, instead overwriting them when ./start_server_bepinex.sh is executed, which overwrites those defined values, with its own string.
The desired behaviour is that the environment variables would be passed into the ./start_server_bepinex.sh row where it launches the server instance.
When the server starts up, the image will ignore the World details that are defined in Environment Variables, instead overwriting them when ./start_server_bepinex.sh is executed, which overwrites those defined values, with its own string.
The desired behaviour is that the environment variables would be passed into the ./start_server_bepinex.sh row where it launches the server instance.
Current workaround is to initially launch a new container instance, then, once the instance is loaded and everything installed, we can go into the file system via https://rwmfiles.theminisip.ca/ and edit/update the start_server_bepinex.sh file to use whatever credentials/details we want/need
Current workaround is to initially launch a new container instance, then, once the instance is loaded and everything installed, we can go into the file system via https://rwmfiles.theminisip.ca/ and edit/update the start_server_bepinex.sh file to use whatever credentials/details we want/need
Proposed solution is to shim the start_server_bepinex.sh file with a wrapper script, and calling the wrapper script instead of the start_server_bepinex.sh script directly. Shim script would be "/opt/valheim/start_server_managed.sh" and the proposed script would contain the following:
'cat > "${VALHEIMDIR}/start_server_managed.sh" << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
Forward environment variables into the BepInEx launcher
Then, in the entrypoint.sh file, we would replace: exec ./start_server_bepinex.sh \
with exec ./start_server_managed.sh
Proposed solution is to shim the start_server_bepinex.sh file with a wrapper script, and calling the wrapper script instead of the start_server_bepinex.sh script directly. Shim script would be "/opt/valheim/start_server_managed.sh" and the proposed script would contain the following:
'cat > "${VALHEIMDIR}/start_server_managed.sh" << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
# Forward environment variables into the BepInEx launcher
exec ./start_server_bepinex.sh \
-name "${SERVER_NAME}" \
-port 2456 \
-world "${WORLD_NAME}" \
-password "${SERVER_PASSWORD}" \
-public "${PUBLIC}"
EOF
chmod +x "${VALHEIMDIR}/start_server_managed.sh"
'
Then, in the entrypoint.sh file, we would replace:
`exec ./start_server_bepinex.sh \
`
with
`exec ./start_server_managed.sh
`
BepInEx is still overwriting, we are going to have to patch the BepInEx server start script directly. The previous work will pass the values as intended, but not resolve the specific issue at hand
BepInEx is still overwriting, we are going to have to patch the BepInEx server start script directly. The previous work will pass the values as intended, but not resolve the specific issue at hand
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When the server starts up, the image will ignore the World details that are defined in Environment Variables, instead overwriting them when ./start_server_bepinex.sh is executed, which overwrites those defined values, with its own string.
The desired behaviour is that the environment variables would be passed into the ./start_server_bepinex.sh row where it launches the server instance.
Current workaround is to initially launch a new container instance, then, once the instance is loaded and everything installed, we can go into the file system via https://rwmfiles.theminisip.ca/ and edit/update the start_server_bepinex.sh file to use whatever credentials/details we want/need
Proposed solution is to shim the start_server_bepinex.sh file with a wrapper script, and calling the wrapper script instead of the start_server_bepinex.sh script directly. Shim script would be "/opt/valheim/start_server_managed.sh" and the proposed script would contain the following:
'cat > "${VALHEIMDIR}/start_server_managed.sh" << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
Forward environment variables into the BepInEx launcher
exec ./start_server_bepinex.sh
-name "${SERVER_NAME}"
-port 2456
-world "${WORLD_NAME}"
-password "${SERVER_PASSWORD}"
-public "${PUBLIC}"
EOF
chmod +x "${VALHEIMDIR}/start_server_managed.sh"
'
Then, in the entrypoint.sh file, we would replace:
exec ./start_server_bepinex.sh \with
exec ./start_server_managed.shCreated script file, updated dockerfile and entrypoint.sh so that wrapper can be leveraged. Ready for testing
BepInEx is still overwriting, we are going to have to patch the BepInEx server start script directly. The previous work will pass the values as intended, but not resolve the specific issue at hand
Entrypoint now handles making sure the values are coming from environment variables now