fix: allow setting the data directroy for non docker installs#2931
Open
kmendell wants to merge 1 commit into
Open
fix: allow setting the data directroy for non docker installs#2931kmendell wants to merge 1 commit into
kmendell wants to merge 1 commit into
Conversation
Contributor
|
Container images for this PR have been built successfully!
Built from commit 89cf4d1 |
5b56cf1 to
89cf4d1
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.

Checklist
mainbranchWhat This PR Implements
Fixes: #2883
Changes Made
Testing Done
AI Tool Used (if applicable)
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR fixes runtime identity behavior for non-Docker (bare-metal or standalone) installs by introducing container detection logic. Previously, the app always defaulted to a non-root UID/GID switch and mountpoint preparation, which was only meaningful inside a container. Now it checks for container signals (
ARCANE_IN_CONTAINERenv var,containerenv var,/.dockerenv,/run/.containerenv) before enabling that behavior.runningInContainerInternalis added to detect container environments; all three Dockerfiles are updated to setARCANE_IN_CONTAINER=trueso existing container builds keep their current behavior.ensureSQLiteFilesExistInternalis called — ensuring the database file is created without attempting any UID switching or mountpoint chowning.Confidence Score: 5/5
Safe to merge — the container detection is additive and well-guarded by explicit env vars in every Dockerfile, so existing container deployments are unaffected.
The logic is straightforward: container installs opt-in via ARCANE_IN_CONTAINER=true (set in all three Dockerfiles) and continue working exactly as before, while non-container installs now correctly skip UID switching and mountpoint preparation. The new runningInContainerInternal function is fully unit-tested across all four detection paths, and the !req.Enabled branch correctly falls through to ensureSQLiteFilesExistInternal so database initialization still happens on bare-metal installs.
No files require special attention.
Reviews (2): Last reviewed commit: "fix: allow setting the data directroy fo..." | Re-trigger Greptile