Databasus: move .env to filesystem root so service starts correctly (#14252)

* Initial plan

* Fix Databasus .env file location so service starts correctly

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>

* fix(databasus): update service EnvironmentFile path in update_script

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>

* fix(databasus): only patch service EnvironmentFile if not already updated

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>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
This commit is contained in:
Copilot
2026-05-04 22:19:14 +02:00
committed by GitHub
parent b353063720
commit 559cfff56a
2 changed files with 14 additions and 7 deletions
+3 -4
View File
@@ -79,7 +79,7 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
# Install goose for migrations
$STD go install github.com/pressly/goose/v3/cmd/goose@latest
ln -sf /root/go/bin/goose /usr/local/bin/goose
cat <<EOF >/opt/databasus/.env
cat <<EOF >/.env
# Environment
ENV_MODE=production
@@ -109,8 +109,7 @@ DATA_DIR=/databasus-data/data
BACKUP_DIR=/databasus-data/backups
LOG_DIR=/databasus-data/logs
EOF
chown postgres:postgres /opt/databasus/.env
chmod 600 /opt/databasus/.env
chmod 600 /.env
msg_ok "Configured Databasus"
msg_info "Configuring Valkey"
@@ -148,7 +147,7 @@ Requires=postgresql.service valkey.service
[Service]
Type=simple
WorkingDirectory=/opt/databasus
EnvironmentFile=/opt/databasus/.env
EnvironmentFile=/.env
ExecStart=/opt/databasus/databasus
Restart=always
RestartSec=5