fix(backup): restore credentials from Docker secret file
Heimdall Gitea / Detect CI scope (pull_request) Successful in 7s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 4m20s
Heimdall Gitea / CI policy (pull_request) Failing after 2s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 7s
Heimdall Gitea / Build and scan server image (pull_request) Canceled after 0s
Heimdall Gitea / Build and scan agent image (pull_request) Canceled after 0s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Canceled after 0s
Heimdall Gitea / Publish versioned release (pull_request) Canceled after 0s
Heimdall Gitea / Build and tests (pull_request) Canceled after 4m20s
Heimdall Gitea / CI policy (pull_request) Failing after 2s
This commit is contained in:
1 parent
428a730938
commit
1f878f5049
3 files changed
+13
-4
No files matched your search
@@ -13,6 +13,7 @@
|
||||
#
|
||||
# Required env vars (set in .env or export):
|
||||
# POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD
|
||||
# or POSTGRES_PASSWORD_FILE (for Docker secrets)
|
||||
# (S3 vars only needed for --s3-key or --latest)
|
||||
# ──────────────────────────────────────────────────────────────────
|
||||
set -euo pipefail
|
||||
@@ -34,7 +35,14 @@ PG_HOST="${POSTGRES_HOST:-localhost}"
|
||||
PG_PORT="${POSTGRES_PORT:-5432}"
|
||||
PG_DB="${POSTGRES_DB:-heimdall}"
|
||||
PG_USER="${POSTGRES_USER:-heimdall}"
|
||||
PG_PASSWORD="${POSTGRES_PASSWORD:-heimdall}"
|
||||
if [[ -n "${POSTGRES_PASSWORD:-}" ]]; then
|
||||
PG_PASSWORD="$POSTGRES_PASSWORD"
|
||||
elif [[ -n "${POSTGRES_PASSWORD_FILE:-}" ]]; then
|
||||
[[ -r "$POSTGRES_PASSWORD_FILE" ]] || { echo "[restore] FATAL: POSTGRES_PASSWORD_FILE is not readable" >&2; exit 1; }
|
||||
PG_PASSWORD="$(<"$POSTGRES_PASSWORD_FILE")"
|
||||
else
|
||||
PG_PASSWORD="heimdall"
|
||||
fi
|
||||
|
||||
S3_ENDPOINT="${RUSTFS_ENDPOINT:-${ALARIK_ENDPOINT:-${S3_ENDPOINT:-}}}"
|
||||
S3_ACCESS_KEY="${RUSTFS_ACCESS_KEY:-${ALARIK_ACCESS_KEY:-${S3_ACCESS_KEY:-}}}"
|
||||
|
||||
Reference in new issue
Block a user