refactor: make configuration read-only at runtime and improve settings for Docker environments - #28
Open
IllusionOfControl wants to merge 2 commits into
Open
IllusionOfControl wants to merge 2 commits into
IllusionOfControl wants to merge 2 commits into
Conversation
… and consistency in code documentation
Contributor
Author
|
In case of consideration of the proposal, I will make an update in this MR, taking into account my past MR #27 |
…ents - Remove runtime modification and saving of .env file - Remove PUT /api/config endpoint and UpdateRuntimeConfig methods - Convert Web UI SettingsPanel into a read-only configuration overview - Expose HEADLESS mode for Camoufox in configuration and .env.example - Add comprehensive documentation and descriptions for ROUTING_STRATEGY
IllusionOfControl
force-pushed
the
refactor/readonly-config
branch
from
September 20, 2026 15:36
d29366c to
6e318e0
Compare
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
Motivation (Docker Context)
Previously, saving settings in the Web UI attempted to rewrite the
.envfile via atomic rename (os.Rename).In Docker container environments, this causes critical issues:
EBUSY: Device or resource busy): when bind-mounting an.envfile into a container (volumes: [ ./.env:/app/.env ]), atomic file replacement via temporary file rename fails under Linux due to locked file inodes.environment:in Compose or-e), OS environment variables take precedence over.envon startup. Changes saved through the Web UI to the file are effectively overridden and lost on restart.This PR makes the service configuration strictly read-only at runtime and completely eliminates
.envmutation by the application.Key Changes
Read-only configuration on backend:
Save()andatomicWritefrominternal/config/config.go.PUT /api/configendpoint andUpdateRuntimeConfigmethods frominternal/api/andinternal/app/.GET /api/config.Simplified read-only SettingsPanel in Web UI:
SettingsPanel.vuefrom an editable form to a clean, compact key-value display..envat startup and are immutable at runtime.Camoufox
HEADLESSconfiguration:Headless: true).HEADLESSenvironment variable (defaults totrue), allowing visible browser window when set tofalsefor debugging and troubleshooting..env.example.Comprehensive
ROUTING_STRATEGYdocumentation:round-robin(balances load and distributes rate limits across accounts) andfill-first(sticky routing until full or cooling down before falling back) in.env.example, Web UI, and docs.Support for
CAMOUFOX_PATHin.env:CAMOUFOX_PATHto recognized.envkeys inconfigKeysso that paths specified in.envare exported to the process environment.