Repository navigation
feat(service): install writes config.env, unit loads it via EnvironmentFile - #948
Merged
Merged
Conversation
The systemd installer now writes a commented config.env next to config.yml (0600, handed to the service user, never overwritten) and the unit loads it with EnvironmentFile=, for both system and user units. The completion output prints both configuration paths. Every SP_* variable overrides the matching config.yml key, so the first start can be prepared with environment variables alone (SP_ADMIN_EMAIL, SP_DB_TYPE, SP_DB_URL documented). Requested by a user testing the LXC install: https://feddit.org/comment/16146954 Closes #947 Co-Authored-By: Claude <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #948 +/- ##
==========================================
- Coverage 90.86% 90.85% -0.01%
==========================================
Files 1399 1399
Lines 144656 144671 +15
==========================================
+ Hits 131438 131447 +9
- Misses 13210 13216 +6
Partials 8 8
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Merged
fclairamb
added a commit
that referenced
this pull request
Nov 22, 2026
🤖 I have created a release *beep* *boop* --- ## [0.53.0](v0.52.0...v0.53.0) (2026-11-22) ### Features * **auth:** OIDC-only mode with IdP group admin roles ([#966](#966)) ([1b51f89](1b51f89)) * **service:** install writes config.env, unit loads it via EnvironmentFile ([#948](#948)) ([e4b7fc4](e4b7fc4)) ### Bug Fixes * **aggregation:** drain the raw backlog in one run and log lag ([#978](#978)) ([26b93cd](26b93cd)) * **deps:** update github.com/dop251/goja digest to 79d6ad3 ([#972](#972)) ([02c6821](02c6821)) * **deps:** update go dependencies (non-major) ([#955](#955)) ([7dfbcd6](7dfbcd6)) * **deps:** update go dependencies (non-major) ([#968](#968)) ([6c09bae](6c09bae)) * **deps:** update go dependencies (non-major) ([#979](#979)) ([ee088b6](ee088b6)) * **deps:** update module github.com/oapi-codegen/oapi-codegen/v2 to v2.9.0 ([#975](#975)) ([1121e2e](1121e2e)) * **deps:** update module go.mongodb.org/mongo-driver/v2 to v2.10.1 ([#950](#950)) ([9e684c4](9e684c4)) * email validation, OAuth error display, translator crash guard, clone slugs, watchdog pauses ([#959](#959)) ([a20f951](a20f951)) * log OAuth code-exchange failures, show a refused sign-in on the invitation page ([#974](#974)) ([c4a8dca](c4a8dca)) * retry SMTP 4xx, 503 on agent auth DB errors, scope checkGroupUid to the org ([#973](#973)) ([88179aa](88179aa)) * **security:** block WebRTC around the browser egress proxy, survive an invalid status page ?lang= ([#957](#957)) ([79bdc82](79bdc82)) * **security:** keep OIDC-group admin grants revocable, mask resolved channel references, contain browser popups ([#976](#976)) ([6e0f09e](6e0f09e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Implements #947, requested by a user who tested the systemd install in an LXC (https://feddit.org/comment/16146954): prepare the first start with environment variables rather than YAML.
What changes
systemdUnit()addsEnvironmentFile=<data dir>/config.envto both system and user units.serviceInstallwrites a commentedconfig.envstarter (0600, chowned to the service user like the data folder). An existingconfig.envis never overwritten — it may hold what the operator set.Configuration (YAML)andConfiguration (ENV)paths.SP_ADMIN_EMAIL,SP_DB_TYPE,SP_DB_URL— eachSP_*overrides the matchingconfig.ymlkey via the koanf env loader), and the drop-in/migration sections updated to reference the built-in file.Tests
EnvironmentFile=line, root install asserts the chown, reuse test asserts an operator'sconfig.envsurvives reinstall.writeConfigEnverror paths (Lstat failure, write failure, chown failure) are covered byTestWriteConfigEnvErrors, for the codecov/patch target.go test . -run 'TestServiceInstall|TestSystemdUnit|TestServiceRun'green in a golang:1.27 Linux container (the linux-tagged tests do not run on the macOS dev host);GOOS=linux go vetclean.Note: #939 (random first-boot password,
SP_ADMIN_PASSWORD) is independent; once both land, the ENV-only first start covers the admin password too.Source: https://feddit.org/comment/16146954