Auto-assignment rules were only applied when an admin clicked
"Regeln jetzt anwenden". New albums created in Immich therefore
never reached editorials automatically.
- applyAllRules() syncs every active editorial's keywords against the
full album list in one pass and grants matches as system actor
- in-process scheduler (src/instrumentation.ts) runs the sync every
AUTO_RULE_SYNC_INTERVAL_SECONDS (default 120s)
- POST /api/cron/album-sync allows external triggers via CRON_SECRET
- overlapping sync runs coalesce to avoid duplicate grants/emails
The portal database lives on an internal-only network and is not exposed to
the host, so `pnpm drizzle-kit migrate` and admin seeding cannot run from the
host. Add one-shot `ops`-profile services built from the builder stage that run
migrations, seed the first admin, and run the preflight smoke test against the
real env from inside the network. Share the app env via an x-portal-env anchor.
Update the runbook to use the new commands.
Co-Authored-By: Claude <noreply@anthropic.com>