5 Commits
Author SHA1 Message Date
Admin 33bf75d245 Give every project its own credentials on the shared services
Every project used the Postgres superuser, the RabbitMQ administrator, an
admin S3 identity and the Zitadel instance-admin PAT, so any one of them
could read or change the others' data.

A new one-shot, `provision` (runs on every `up`, idempotent), gives each
project in x-projects its own:

- Postgres role, owner of its database. No database is open to PUBLIC
  anymore, so a role can only connect to its own. An existing database
  and everything in it is handed over to the project's role.
- RabbitMQ user, with permissions on its own vhost only.
- Zitadel service account, PROJECT_OWNER of its own project only; its
  PAT is written to zitadel/.output/<project>/ for that project's
  zitadel-init to mount instead of the admin PAT.

SeaweedFS renders one S3 identity per project, limited to its bucket, and
refuses to start with a clear message on a malformed or repeated key.

The admin accounts stay with this stack. postgres-init is gone: provision
creates the databases. *.sh files are checked out with LF so they run in
the Linux containers from a Windows checkout.
2026-09-24 17:05:12 +02:00
Admin 668cdb17b0 Move the dev Zitadel login to port 3900
Ping's web app already listens on 3100 in dev, so both couldn't run at
the same time.
2026-09-24 17:05:01 +02:00
Admin 0aa4cb1410 Pin images, rotate logs, cap Jaeger and bind dev ports to loopback
- Pin seaweedfs (4.47), jaeger (1.76.0), certbot (v5.8.0) and pgadmin
  (9.18) instead of :latest.
- Rotate container logs (json-file, 3 x 10 MB) in every stack.
- Cap Jaeger's in-memory storage at 100k traces and add a healthcheck.
- Publish dev ports on 127.0.0.1 (DEV_BIND_ADDRESS) so the dev
  credentials aren't reachable from the LAN.
- Fix the prod command in compose.yml's header, the README's note on who
  writes the admin PAT, and the certbot command's line breaks.
2026-09-24 15:05:45 +02:00
Admin 6dcbd9589a Serve the Zitadel login from the Login V2 container
Zitadel v4 redirects every sign-in to /ui/v2/login, which is served by a
separate container (zitadel-login) that this stack didn't run, so logging
in on a fresh instance ended in a 404.

- Add zitadel-login, with its own service account (login-client) whose
  PAT Zitadel writes to a volume only that container mounts.
- Configure the Login V2 base URL (ZITADEL_LOGIN_BASE_URL): its own port
  in dev, same hostname as Zitadel behind the edge in prod.
- Pin zitadel and zitadel-login to v4.19.1 and add healthchecks.
- Run Zitadel as root, as Zitadel's own compose does, so it can write the
  PATs into root-owned mounts (the Linux bind mount and the new volume).
- Route /ui/v2/login on the auth vhost to the login container and drop
  the no-op grpc_set_header.
- Document the extra steps for an instance created before this.
2026-09-24 15:05:42 +02:00
Admin c35881f471 Add shared infrastructure base stack
Postgres, Zitadel and SeaweedFS were previously duplicated or fragilely
cross-referenced across the Musify, Ping and docker-manager repos. This
consolidates them into one place: compose.yml is the production shape
(no published ports, joins infra-net), compose.dev.yml is a thin overlay
that publishes ports for local development.
2026-09-21 21:11:26 +02:00