The chat service was added on the host by go-live.sh chat and never pushed, so a deploy took it out of compose.yml. This is the service as the host ran it, with chat.env ignored and the sign-in pages named after SITE_TITLE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015TMMKWhj4225cSbXKhSz6e
This commit is contained in:
4 files changed
+41
-3
No files matched your search
@@ -43,6 +43,14 @@ PEOPLE_BACKEND=memberships
|
|||||||
GITEA_URL=https://prosjekt.klingenbergbygg.no
|
GITEA_URL=https://prosjekt.klingenbergbygg.no
|
||||||
GITEA_AUTH_NAME=tomtervel
|
GITEA_AUTH_NAME=tomtervel
|
||||||
|
|
||||||
|
# The vel's conversations, on their own address. go-live.sh sets the two
|
||||||
|
# below once chat.env (the sign-in client's secret, gitignored) is there;
|
||||||
|
# without them `up` leaves the chat out. 0.4.0 and older say the wrong
|
||||||
|
# name on their sign-in page: use a tag above it.
|
||||||
|
#CNATS_TAG=0.4.1
|
||||||
|
#COMPOSE_PROFILES=chat
|
||||||
|
CHAT_HOST=chat.vel.klingenbergbygg.no
|
||||||
|
|
||||||
# Filled in by bootstrap.sh after it creates the Kanidm client.
|
# Filled in by bootstrap.sh after it creates the Kanidm client.
|
||||||
OAUTH2_CLIENT_ID=tomtervel-portal
|
OAUTH2_CLIENT_ID=tomtervel-portal
|
||||||
OAUTH2_CLIENT_SECRET=
|
OAUTH2_CLIENT_SECRET=
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.env
|
.env
|
||||||
portal.env
|
portal.env
|
||||||
|
chat.env
|
||||||
kanidm/server.toml
|
kanidm/server.toml
|
||||||
nats/nats.conf
|
nats/nats.conf
|
||||||
certs/
|
certs/
|
||||||
|
|||||||
+26
@@ -140,6 +140,32 @@ services:
|
|||||||
# published 127.0.0.1:4222 port above, so no in-compose runner — and no
|
# published 127.0.0.1:4222 port above, so no in-compose runner — and no
|
||||||
# docker.sock/podman.sock mount — is needed here.
|
# docker.sock/podman.sock mount — is needed here.
|
||||||
|
|
||||||
|
# The vel's conversations: every group the content names is a room,
|
||||||
|
# portal speaks in them and decides who gets in. Its history is on the
|
||||||
|
# vel's own NATS (stream tomtervel_CHAT); there is no Postgres. A
|
||||||
|
# profile, since it needs chat.env: go-live sets COMPOSE_PROFILES=chat
|
||||||
|
# in .env once it is there. Host-published for kasse's host Caddy
|
||||||
|
# (chat.vel.klingenbergbygg.no -> here).
|
||||||
|
cnats:
|
||||||
|
profiles: ["chat"]
|
||||||
|
image: docker.io/bendik/cnats:${CNATS_TAG:-no-tag-set}
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- path: chat.env
|
||||||
|
required: false
|
||||||
|
environment:
|
||||||
|
# Must be the portal's own: a new name is a new, empty chat.
|
||||||
|
SITE_NAME: tomtervel
|
||||||
|
NATS_URL: nats://portal:${NATS_PASSWORD}@nats:4222
|
||||||
|
KANIDM_URL: https://${ID_HOST}
|
||||||
|
PUBLIC_URL: https://${CHAT_HOST:-chat.vel.klingenbergbygg.no}
|
||||||
|
COOKIE_SECURE: "true"
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:3070:3000"
|
||||||
|
depends_on:
|
||||||
|
nats:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
# Where uploads go: the pictures and documents a desk attaches, and what
|
# Where uploads go: the pictures and documents a desk attaches, and what
|
||||||
# `portal import` brings in. One node on this host, reachable only inside
|
# `portal import` brings in. One node on this host, reachable only inside
|
||||||
# the project; nothing is published. go-live.sh garage renders
|
# the project; nothing is published. go-live.sh garage renders
|
||||||
|
|||||||
+6
-3
@@ -15,6 +15,9 @@ cd "$(dirname "$0")"
|
|||||||
K="kanidm -D idm_admin -H https://$ID_HOST"
|
K="kanidm -D idm_admin -H https://$ID_HOST"
|
||||||
C=$OAUTH2_CLIENT_ID
|
C=$OAUTH2_CLIENT_ID
|
||||||
SA=portal-onboarding
|
SA=portal-onboarding
|
||||||
|
# What a person reads on the sign-in pages. Not SITE_NAME, which from portal
|
||||||
|
# 0.9 is the site's namespace, `tomtervel`.
|
||||||
|
SITE_TITLE=${SITE_TITLE:-Tomter Vel}
|
||||||
|
|
||||||
# Already signed in? Then do not ask again: this script is meant to be
|
# Already signed in? Then do not ask again: this script is meant to be
|
||||||
# rerunnable, and the session outlives a single run.
|
# rerunnable, and the session outlives a single run.
|
||||||
@@ -76,7 +79,7 @@ fi
|
|||||||
# The OAuth2 client. Everyone in this Kanidm is the vel's, so anyone
|
# The OAuth2 client. Everyone in this Kanidm is the vel's, so anyone
|
||||||
# may sign in; what they see is decided by their desk groups, which
|
# may sign in; what they see is decided by their desk groups, which
|
||||||
# arrive in the `groups` claim under their own names.
|
# arrive in the `groups` claim under their own names.
|
||||||
has_client $C || $K system oauth2 create $C "$SITE_NAME" "https://$PORTAL_HOST"
|
has_client $C || $K system oauth2 create $C "$SITE_TITLE" "https://$PORTAL_HOST"
|
||||||
$K system oauth2 add-redirect-url $C "https://$PORTAL_HOST/auth/callback" 2>/dev/null || true
|
$K system oauth2 add-redirect-url $C "https://$PORTAL_HOST/auth/callback" 2>/dev/null || true
|
||||||
$K system oauth2 update-scope-map $C idm_all_persons openid profile email
|
$K system oauth2 update-scope-map $C idm_all_persons openid profile email
|
||||||
for g in $groups; do
|
for g in $groups; do
|
||||||
@@ -100,7 +103,7 @@ fi
|
|||||||
# may change - idm_admin gets a bare "Item not found" - so that half
|
# may change - idm_admin gets a bare "Item not found" - so that half
|
||||||
# runs when an admin session exists, and otherwise says what to run.
|
# runs when an admin session exists, and otherwise says what to run.
|
||||||
A="kanidm -D admin -H https://$ID_HOST"
|
A="kanidm -D admin -H https://$ID_HOST"
|
||||||
$K system oauth2 set-displayname $C "$SITE_NAME" >/dev/null || true
|
$K system oauth2 set-displayname $C "$SITE_TITLE" >/dev/null || true
|
||||||
logo=$(mktemp --suffix=.svg)
|
logo=$(mktemp --suffix=.svg)
|
||||||
if curl -sfL "$CONTENT_REPO/raw/branch/$CONTENT_BRANCH/images/logo.svg" -o "$logo" && [ -s "$logo" ]; then
|
if curl -sfL "$CONTENT_REPO/raw/branch/$CONTENT_BRANCH/images/logo.svg" -o "$logo" && [ -s "$logo" ]; then
|
||||||
$K system oauth2 set-image $C "$logo" svg >/dev/null || echo "note: could not set the client logo"
|
$K system oauth2 set-image $C "$logo" svg >/dev/null || echo "note: could not set the client logo"
|
||||||
@@ -109,7 +112,7 @@ else
|
|||||||
: > "$logo"
|
: > "$logo"
|
||||||
fi
|
fi
|
||||||
if $A self whoami >/dev/null 2>&1; then
|
if $A self whoami >/dev/null 2>&1; then
|
||||||
$A system domain set-displayname "$SITE_NAME" >/dev/null || echo "note: could not set the login page's name"
|
$A system domain set-displayname "$SITE_TITLE" >/dev/null || echo "note: could not set the login page's name"
|
||||||
[ -s "$logo" ] && { $A system domain set-image "$logo" svg >/dev/null || echo "note: could not set the login page's logo"; }
|
[ -s "$logo" ] && { $A system domain set-image "$logo" svg >/dev/null || echo "note: could not set the login page's logo"; }
|
||||||
else
|
else
|
||||||
echo "note: the login page's own name and logo need the admin account (bootstrap.sh printed its password):"
|
echo "note: the login page's own name and logo need the admin account (bootstrap.sh printed its password):"
|
||||||
|
|||||||
Reference in new issue
Block a user