diff --git a/deployments/archie/compose.yml b/deployments/archie/compose.yml index cabb34296..cc9114749 100644 --- a/deployments/archie/compose.yml +++ b/deployments/archie/compose.yml @@ -23,6 +23,12 @@ services: image: gcr.io/distroless/static-debian12:nonroot restart: unless-stopped command: ["/archie/archie", "-config", "/archie/config.toml"] + environment: + # The age secret engine resolves secret:// references from this file with + # this identity. Both are paths the state mount already holds, so no key + # is in this file. + AGE_FILE: /archie/state/age/secrets.age + AGE_IDENTITY: /archie/state/age/identity.txt # Docker's default seccomp profile plus the one clone the extension host # needs to confine an extension in its own user and network namespace. security_opt: diff --git a/deployments/archie/deploy.sh b/deployments/archie/deploy.sh index 150abe019..451d93029 100755 --- a/deployments/archie/deploy.sh +++ b/deployments/archie/deploy.sh @@ -67,6 +67,16 @@ if ! grep -q '^age_identity' config.toml; then unset identity chown 65532:65532 config.toml fi +# The age secret engine resolves secret:// references from this key and the +# file sealed to it. Skipped, not fatal, where age isn't installed: the engine +# simply has nothing to read. +if [ ! -f state/age/identity.txt ] && command -v age-keygen >/dev/null; then + umask 077 + mkdir -p state/age + age-keygen -o state/age/identity.txt 2>/dev/null + chown -R 65532:65532 state/age + echo "age secret engine recipient: $(age-keygen -y state/age/identity.txt)" +fi docker compose up -d --remove-orphans docker compose up -d --force-recreate archie REMOTE