Databasus: move .env to filesystem root so service starts correctly#14252
Merged
CrazyWolf13 merged 4 commits intomainfrom May 4, 2026
Merged
Databasus: move .env to filesystem root so service starts correctly#14252CrazyWolf13 merged 4 commits intomainfrom
CrazyWolf13 merged 4 commits intomainfrom
Conversation
2 tasks
Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/5b4ddcc8-18a3-49b4-9281-b14c712ebb7f Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix databasus service failed to start
fix(databasus): move .env to filesystem root so service starts correctly
May 4, 2026
Member
|
@copilot Update of Service in update_script is missing |
Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/b4dcde99-e021-40ce-bdbd-3afc224ab6d4 Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
Contributor
Author
Added in commit |
Member
|
@copilot grep If Service already updated or Not... |
…ated Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/47c48b0f-1527-4b9c-a6f5-74c789e79785 Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
Contributor
Author
Done in |
MickLesk
approved these changes
May 4, 2026
michelroegl-brunner
approved these changes
May 4, 2026
CrazyWolf13
approved these changes
May 4, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The Databasus service exits immediately after install because
config.gotraverses up from the working directory looking forgo.mod, then loads.envfrom the parent of wherevergo.modis found. Sincego.modlives in/opt/databasus/backend/but the serviceWorkingDirectoryis/opt/databasus/, the traversal reaches/and attempts to load/.env— which was never created.✍️ Description
install/databasus-install.sh.envto/.envinstead of/opt/databasus/.envchown postgres:postgres(service runs as root); keepchmod 600EnvironmentFile=/.envin the systemd unitct/databasus.sh(update function)/.envinstead of/opt/databasus/.envchmod 600on the backup file to prevent secrets exposure during updateEnvironmentFile=/.envand reload the daemon, so containers updated from older installs also get the corrected path without a full reinstallgrepcheck so it only runs whenEnvironmentFile=/.envis not already present, avoiding redundant writes and daemon reloads on already-updated containersPlacing
.envat/.envis consistent with the app's traversal logic and keeps it outside/opt/databasus/, so it survivesCLEAN_INSTALL=1updates without needing special backup/restore handling. The/databasus-data/paths already at filesystem root are likewise preserved.✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.