Kanidm ut av stacken, bootstrap.sh, kanidm-setup.sh og kanidm/ borte. Rauthy er en vanlig tjeneste, ikke en profil, og deployen krever dens verdier i stedet for ID_HOST og KANIDM_API_TOKEN. Portalen får ingen KANIDM_* lenger, så kontoene lages i Rauthy. id.tomtervel.no sender videre til konto. Volumet kanidm_data blir liggende på kasse urørt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
This commit is contained in:
11 files changed
+121
-576
No files matched your search
+17
-45
@@ -1,4 +1,4 @@
|
||||
# Tomter Vel's own platform: portal + its own Kanidm and NATS as podman
|
||||
# Tomter Vel's own platform: portal + its own Rauthy and NATS as podman
|
||||
# containers. The content (pages, forms, desks) is not here: portal fetches
|
||||
# it from tomtervel/questions on prosjekt.klingenbergbygg.no and hot-reloads
|
||||
# it over NATS. This repo owns identity, the bus, and which portal version
|
||||
@@ -6,11 +6,9 @@
|
||||
# (`--profile edge`) terminates it; on kasse the host Caddy already owns
|
||||
# 80/443 and reverse-proxies vel.klingenbergbygg.no -> portal (127.0.0.1:3050).
|
||||
#
|
||||
# bootstrap.sh first time on a fresh host: renders configs from
|
||||
# .env, makes Kanidm's internal cert, starts it all,
|
||||
# recovers the Kanidm admin, creates the portal client
|
||||
# and desk groups.
|
||||
# podman compose up -d --build every time after that.
|
||||
# Everything it runs with is an Actions variable or secret, written by
|
||||
# the deploy workflow (README.md); `podman compose up -d --build` is
|
||||
# what deploy-tomtervel runs.
|
||||
|
||||
name: tomtervel
|
||||
|
||||
@@ -29,14 +27,14 @@ services:
|
||||
- "443:443/udp"
|
||||
environment:
|
||||
PORTAL_HOST: ${PORTAL_HOST}
|
||||
ID_HOST: ${ID_HOST}
|
||||
RAUTHY_HOST: ${RAUTHY_HOST}
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
depends_on:
|
||||
- portal
|
||||
- kanidm
|
||||
- rauthy
|
||||
|
||||
nats:
|
||||
image: nats:2.14.6-alpine
|
||||
@@ -60,35 +58,12 @@ services:
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
kanidm:
|
||||
image: kanidm/server:1.11.2
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
KANIDM_CONFIG_PATH: /data/server.toml
|
||||
volumes:
|
||||
- kanidm_data:/data
|
||||
- ./kanidm/server.toml:/data/server.toml:ro
|
||||
# Internal self-signed TLS: Caddy terminates the public
|
||||
# certificate and proxies here without verification.
|
||||
- ./certs/kanidm-chain.pem:/data/chain.pem:ro
|
||||
- ./certs/kanidm-key.pem:/data/key.pem:ro
|
||||
# Standalone (--profile edge): only the bundled Caddy talks to Kanidm.
|
||||
# On kasse the host Caddy fronts it, so publish loopback-only for a conf.d
|
||||
# entry: id.<vel> { reverse_proxy https://localhost:8443 {
|
||||
# transport http { tls_insecure_skip_verify } } }
|
||||
# (Kanidm's internal self-signed cert; 8443 is free on kasse — its shared
|
||||
# Kanidm is on 8310.)
|
||||
ports:
|
||||
- "127.0.0.1:8443:8443"
|
||||
|
||||
# Rauthy: sign-in, account pages and account mail in Norwegian, as an
|
||||
# alternative to Kanidm (which has no Norwegian). A profile, off unless
|
||||
# COMPOSE_PROFILES has `rauthy`; with it, portal and the chat sign in
|
||||
# here when OIDC_ISSUER is set, and portal makes accounts here with
|
||||
# RAUTHY_API_KEY. Its database is embedded (hiqlite), in rauthy_data.
|
||||
# Host-published for kasse's host Caddy (RAUTHY_HOST -> here).
|
||||
# Rauthy: who is who. Sign-in, account pages and account mail, in
|
||||
# Norwegian; portal and the chat sign in here (OIDC_ISSUER) and portal
|
||||
# makes accounts here (RAUTHY_API_KEY). Its database is embedded
|
||||
# (hiqlite), in rauthy_data. Host-published for kasse's host Caddy
|
||||
# (RAUTHY_HOST -> here).
|
||||
rauthy:
|
||||
profiles: ["rauthy"]
|
||||
image: ghcr.io/sebadob/rauthy:${RAUTHY_TAG:-0.37.2}
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
@@ -135,7 +110,7 @@ services:
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_healthy
|
||||
kanidm:
|
||||
rauthy:
|
||||
condition: service_started
|
||||
|
||||
# The mailer. Portal decides what to send - a `mail:` on a state in the
|
||||
@@ -188,10 +163,8 @@ services:
|
||||
environment:
|
||||
# Must be the portal's own: a new name is a new, empty chat.
|
||||
SITE_NAME: tomtervel
|
||||
KANIDM_URL: https://${ID_HOST}
|
||||
# Set, the chat signs in through it instead of Kanidm (Rauthy:
|
||||
# https://<RAUTHY_HOST>/auth/v1/). Empty is unset.
|
||||
OIDC_ISSUER: ${OIDC_ISSUER:-}
|
||||
# Rauthy: https://<RAUTHY_HOST>/auth/v1/
|
||||
OIDC_ISSUER: ${OIDC_ISSUER}
|
||||
PUBLIC_URL: https://${CHAT_HOST}
|
||||
COOKIE_SECURE: "true"
|
||||
ports:
|
||||
@@ -217,13 +190,12 @@ volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
nats_data:
|
||||
kanidm_data:
|
||||
rauthy_data:
|
||||
learn_cache:
|
||||
|
||||
# Pin the project network subnet inside 172.16/12 so Kanidm's X-Forwarded-For
|
||||
# trust (kanidm/server.toml.tpl) stays valid under Podman — its default pool
|
||||
# hands out 10.89.x addresses that Caddy's forwarded client IP can't match.
|
||||
# Pin the project network subnet inside 172.16/12 so Rauthy's trusted
|
||||
# proxies (rauthy/config.toml) stay valid under Podman — its default pool
|
||||
# hands out 10.89.x addresses that the forwarded client IP can't match.
|
||||
networks:
|
||||
default:
|
||||
ipam:
|
||||
|
||||
Reference in new issue
Block a user