authentik: boot-persistent quadlet conversion with deploy handler
The compose-era authentik trio died at every boot (rootless podman does not auto-start bare containers). Convert the trio to Quadlet units installed by deploy-remote.sh into ~/.config/containers/systemd/, enabled + WantedBy= default.target: - 3 unit files under dankclaw/authentik/quadlet/ (postgres -> server -> worker ordering via Wants=/After=; secrets stay in the git-ignored host .env, expanded by systemd at start time exactly like the gitea units) - deploy_authentik() handler: install units, daemon-reload, retire stale compose-era containers only while units are inactive, enable once, then start in dependency order with podman-health gates between stages - compose.yaml: authentik service definitions retired to a comment pointing at the quadlet dir (same pattern as searxng/open-webui/gitea/caddy) - tests/authentik.bats rewritten from compose assertions to unit-file contract assertions (images, Exec roles, ordering, loopback-only publish, pg_isready probe, secret hygiene, dispatch routing)
This commit is contained in:
1 parent
5829a0bfe8
commit
914e251ebc
6 files changed
+211
-120
No files matched your search
@@ -0,0 +1,46 @@
|
||||
# Quadlet unit: Authentik core + embedded Caddy outpost (rootless, boot-persistent).
|
||||
#
|
||||
# Install path on dankclaw: ~/.config/containers/systemd/authentik-server.container
|
||||
# Unit name: authentik-server.service (podman 5.x drops the container- prefix)
|
||||
#
|
||||
# The embedded outpost serves /outpost.goauthentik.io/* including the
|
||||
# /auth/caddy forward_auth endpoint the Caddyfile chains to — no outpost token
|
||||
# exists for this deployment by design. Resolved by name (A2A DNS) from every
|
||||
# container on dankclaw_default, including caddy. The 9000 publish is
|
||||
# loopback-only on purpose: LAN clients reach Authentik through Caddy, never
|
||||
# around it; the loopback publish exists so host-side tooling can probe
|
||||
# /-/health/. Runs as the image default user (same userns mapping the compose
|
||||
# era used, so the existing /data ownership carries over unchanged).
|
||||
|
||||
[Unit]
|
||||
Description=Authentik server container
|
||||
After=network.target authentik-postgres.service
|
||||
Wants=authentik-postgres.service
|
||||
|
||||
[Container]
|
||||
ContainerName=authentik-server
|
||||
Image=ghcr.io/goauthentik/server:2026.8.0
|
||||
Exec=server
|
||||
Network=dankclaw_default
|
||||
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
|
||||
Environment=AUTHENTIK_POSTGRESQL__HOST=authentik-postgres
|
||||
Environment=AUTHENTIK_POSTGRESQL__NAME=authentik
|
||||
Environment=AUTHENTIK_POSTGRESQL__USER=authentik
|
||||
Environment=AUTHENTIK_POSTGRESQL__PASSWORD=${AUTHENTIK_PG_PASS}
|
||||
Environment=AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET_KEY}
|
||||
PublishPort=127.0.0.1:9000:9000
|
||||
HealthCmd=python -c "import urllib.request;urllib.request.urlopen('http://localhost:9000/-/health/')"
|
||||
--shm-size=512m
|
||||
HealthInterval=30s
|
||||
HealthTimeout=10s
|
||||
HealthRetries=5
|
||||
HealthStartPeriod=30s
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
|
||||
TimeoutStartSec=900
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in new issue
Block a user