coreapp new --postgres --sso: database and sign-in together

Overlays no longer replace service: each names the Core apps it needs in
.depends, merged into DEPENDS. The sign-in code is a module (oidc.py)
that examples import; templates/postgres-sso is the combined example
(sign-in, each person's visits counted in PostgreSQL). Tested with
team-visits, including sign-in in a browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:43:22 -07:00
co-authored by Claude Opus 5.5
parent 284f52fc29
commit d8c6d1011f
14 changed files with 381 additions and 172 deletions
+13 -2
View File
@@ -189,8 +189,8 @@ no `blackboxregistrar` request.
1. `coreapp new --sso sso-demo`: has `app.py`, no `www/`; `service` has
`DEPENDS="authelia"`; `docker-compose.yml.in` has `extra_hosts` with
`@TRAEFIK_IP@`; `env.in` has `OIDC_*`; the README has a Sign-in section.
`coreapp new --sso --postgres x` refuses.
`@TRAEFIK_IP@`; `env.in` has `OIDC_*`; `app.py` and `oidc.py`; the README
has a Sign-in section.
2. `coreapp deploy`, `coreapp check`. On the Core, `idproviders.yml` has one
`### coreapp-sso-demo begin` block; Authelia is healthy;
`docker exec authelia authelia validate-config` is OK; no `*.bak` is
@@ -203,3 +203,14 @@ no `blackboxregistrar` request.
sign-in link.
5. Redeploy: still one client block. `coreapp remove`: none, Authelia
healthy, other clients (Nextcloud) still work. Deploy again: one block.
### With both
1. `coreapp new --postgres --sso team-visits`: `service` has
`DEPENDS="postgresql authelia"`; `env.in` has `DB_*` and `OIDC_*`;
`install` creates the database and registers the client; `uninstall`
undoes both; `app.py` imports `oidc` and `psycopg`.
2. `coreapp deploy`, `coreapp check`. In a browser, sign in: the page shows
your name and "Your visits", which counts up on reload. Another account
gets its own count; "people who have visited" counts both.
3. `coreapp remove`: the database, user and Authelia client are gone.