Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -14,7 +14,7 @@
|
||||
# in the background. Re-uses postgres16-client (matches the postgres:16-alpine
|
||||
# pin in docker-compose.yml).
|
||||
|
||||
FROM alpine:3.20
|
||||
FROM alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
|
||||
|
||||
# --- Runtime deps ------------------------------------------------------------
|
||||
# postgresql16-client -> pg_dump
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# 2. tar of /media (Authentik media volume, mounted into this container)
|
||||
# 3. SECRETS-MANIFEST.txt listing the env-var names that MUST be backed up
|
||||
# out-of-band (Coolify-Vault export)
|
||||
# 4. GPG-encrypt all three artifacts (recipient OR AES256 fallback)
|
||||
# 4. GPG-encrypt all three artifacts to a dedicated backup recipient
|
||||
# 5. Upload to S3 under s3://<bucket>/authentik/YYYY-MM-DD/
|
||||
#
|
||||
# Env (sourced from the Compose service `environment` block, which itself
|
||||
@@ -19,8 +19,7 @@
|
||||
# AUTHENTIK_S3_BACKUP_BUCKET target bucket name
|
||||
# AUTHENTIK_S3_BACKUP_ACCESS_KEY S3 access key
|
||||
# AUTHENTIK_S3_BACKUP_SECRET_KEY S3 secret key
|
||||
# AUTHENTIK_SECRET_KEY fallback symmetric passphrase for GPG
|
||||
# AUTHENTIK_BACKUP_GPG_RECIPIENT optional GPG recipient fingerprint
|
||||
# AUTHENTIK_BACKUP_GPG_RECIPIENT required dedicated GPG recipient fingerprint
|
||||
#
|
||||
# AUTHENTIK_PG_HOST default "postgresql" (compose service name)
|
||||
# AUTHENTIK_PG_PORT default 5432
|
||||
@@ -44,6 +43,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
||||
: "${AUTHENTIK_S3_BACKUP_ACCESS_KEY:?AUTHENTIK_S3_BACKUP_ACCESS_KEY is required}"
|
||||
: "${AUTHENTIK_S3_BACKUP_SECRET_KEY:?AUTHENTIK_S3_BACKUP_SECRET_KEY is required}"
|
||||
: "${AUTHENTIK_POSTGRESQL__PASSWORD:?AUTHENTIK_POSTGRESQL__PASSWORD is required}"
|
||||
: "${AUTHENTIK_BACKUP_GPG_RECIPIENT:?AUTHENTIK_BACKUP_GPG_RECIPIENT is required}"
|
||||
|
||||
TODAY="$(date -u +%Y-%m-%d)"
|
||||
NOW="$(date -u +%Y-%m-%dT%H-%M-%SZ)"
|
||||
@@ -135,16 +135,9 @@ EOF
|
||||
encrypt() {
|
||||
local src="$1"
|
||||
local dst="${src}.gpg"
|
||||
if [[ -n "${AUTHENTIK_BACKUP_GPG_RECIPIENT:-}" ]]; then
|
||||
log "encrypting ${src##*/} to GPG recipient ${AUTHENTIK_BACKUP_GPG_RECIPIENT}"
|
||||
gpg --batch --yes --trust-model always --recipient "${AUTHENTIK_BACKUP_GPG_RECIPIENT}" \
|
||||
--output "${dst}" --encrypt "${src}"
|
||||
else
|
||||
log "encrypting ${src##*/} symmetrically (AES256) with AUTHENTIK_SECRET_KEY"
|
||||
gpg --batch --yes --symmetric --cipher-algo AES256 \
|
||||
--passphrase "${AUTHENTIK_SECRET_KEY:?AUTHENTIK_SECRET_KEY missing for symmetric fallback}" \
|
||||
--output "${dst}" "${src}"
|
||||
fi
|
||||
log "encrypting ${src##*/} to the dedicated backup GPG recipient"
|
||||
gpg --batch --yes --trust-model always --recipient "${AUTHENTIK_BACKUP_GPG_RECIPIENT}" \
|
||||
--output "${dst}" --encrypt "${src}"
|
||||
rm -f "${src}"
|
||||
printf "%s" "${dst}"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user