svc-selkies: honor SELKIES_MODE env var in run script#152
Open
DL6ER wants to merge 1 commit intolinuxserver:masterfrom
Open
svc-selkies: honor SELKIES_MODE env var in run script#152DL6ER wants to merge 1 commit intolinuxserver:masterfrom
DL6ER wants to merge 1 commit intolinuxserver:masterfrom
Conversation
Selkies's argument parser declares a `mode` setting with `env_var:
SELKIES_MODE` that selects between `websockets` (default) and `webrtc`.
The s6 run script for svc-selkies hardcodes `--mode="websockets"`
which overrides the env var and forces every container into
websocket-mode regardless of the user's `-e SELKIES_MODE=webrtc` setting.
Replace the hardcoded value with `${SELKIES_MODE:-websockets}` so the
existing default is preserved while the documented env var actually
takes effect.
Both the production exec and the DEV_MODE branch are updated for
consistency.
There was a problem hiding this comment.
Pull request overview
This PR updates the svc-selkies s6 run script so Selkies’ startup mode can be configured via the documented SELKIES_MODE environment variable instead of being overridden by a hardcoded CLI flag.
Changes:
- Replace hardcoded
--mode="websockets"with--mode="${SELKIES_MODE:-websockets}"in the DEV_MODE (nodemon) launch path. - Replace hardcoded
--mode="websockets"with--mode="${SELKIES_MODE:-websockets}"in the productionexeclaunch path.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
I am a bot, here are the test results for this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Replace the hardcoded
--mode="websockets"in the svc-selkies s6 run script with--mode="${SELKIES_MODE:-websockets}", in both the production exec and the DEV_MODE branch.Benefits of this PR and context:
Selkies declares a
modesetting withenv_var: SELKIES_MODE(seesrc/selkies/settings.py):{'name': 'mode', 'type': 'str', 'default': 'websockets', 'env_var': 'SELKIES_MODE', 'help': "Specify the mode: 'webrtc' or 'websockets'; defaults to websockets"}But because the run script passes
--mode="websockets"on the command line, the hardcoded value wins over the env var. Setting-e SELKIES_MODE=webrtcon the container has no effect; users have to either patch the run script at runtime or live-edit the compiled/run/service/svc-selkies/run.After this change, the env var works as documented: the default behaviour stays
websocketswhile-e SELKIES_MODE=webrtcactually selects WebRTC mode at startup. Combined with the dual-mode supervisor (separate PRs), this lets users choose the initial mode declaratively.How Has This Been Tested?
Without env var:
Default behaviour preserved.
Source / References:
selkies-project/selkiessrc/selkies/settings.py, fieldmodewithenv_var: SELKIES_MODE.root/etc/s6-overlay/s6-rc.d/svc-selkies/run.