Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -108,8 +108,6 @@ AUTHENTIK_S3_BACKUP_BUCKET=hivegrid-authentik-backups
AUTHENTIK_S3_BACKUP_ACCESS_KEY=replace-me
AUTHENTIK_S3_BACKUP_SECRET_KEY=replace-me
# Optional: GPG recipient fingerprint to encrypt the backups with before
# upload. If left empty, backup.sh falls back to AES256-symmetric with
# AUTHENTIK_SECRET_KEY as passphrase (better than plaintext, but rotate
# carefully — losing the key destroys the backup readability).
AUTHENTIK_BACKUP_GPG_RECIPIENT=
# Required: dedicated GPG recipient fingerprint for backup encryption. Never
# reuse AUTHENTIK_SECRET_KEY or another runtime secret as backup key material.
AUTHENTIK_BACKUP_GPG_RECIPIENT=replace-me-with-dedicated-backup-recipient
@@ -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}"
}
@@ -48,7 +48,7 @@ volumes:
services:
# --- Postgres 16 ---------------------------------------------------------
postgresql:
image: postgres:16-alpine
image: postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
restart: unless-stopped
networks:
- authentik-net
@@ -67,7 +67,7 @@ services:
# --- Redis 7 -------------------------------------------------------------
redis:
image: redis:7-alpine
image: redis:7-alpine@sha256:6ab0b6e7381779332f97b8ca76193e45b0756f38d4c0dcda72dbb3c32061ab99
command: --save 60 1 --loglevel warning
restart: unless-stopped
networks:
@@ -83,7 +83,7 @@ services:
# --- Authentik server (web/api/HTTP) ------------------------------------
server:
image: ghcr.io/goauthentik/server:2026.2.3
image: ghcr.io/goauthentik/server:2026.2.3@sha256:7806ae1ae3423624fe90331e8b3dcca0afc155fac890c696dd92ddac6dc3a384
restart: unless-stopped
command: server
networks:
@@ -147,7 +147,7 @@ services:
# --- Authentik worker (background jobs, blueprint apply, email) ---------
worker:
image: ghcr.io/goauthentik/server:2026.2.3
image: ghcr.io/goauthentik/server:2026.2.3@sha256:7806ae1ae3423624fe90331e8b3dcca0afc155fac890c696dd92ddac6dc3a384
restart: unless-stopped
command: worker
networks: