What the stack is, in git: .env committed, the secrets on the host

.env is what `podman compose` reads as is: the hosts, the versions and
where the content comes from, so moving to tomtervel.no or bumping portal
is a commit that the deploy workflow brings up. Nothing in it is secret.

The secrets stay on kasse in secrets.env (the old .env's NATS password,
OAuth2 secret and first person), and what the scripts render from it.
gdo and the chat get NATS_URL from nats.env instead of interpolating
the password, and portal takes its URLs and content settings from .env
over portal.env, so a new host name reaches it without re-running
bootstrap.sh. The deploy script on kasse is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
This commit is contained in:
blandClaude Opus 5.5 committed 2026-11-07 16:29:55 +01:00
1 parent 213ef712c7
commit a76e6321ee
9 files changed
+125 -83

No files matched your search

+16 -3
View File
@@ -85,8 +85,20 @@ services:
args:
PORTAL_RELEASE: ${PORTAL_RELEASE}
restart: unless-stopped
# portal.env holds the secrets (NATS, the OAuth2 secret, the
# onboarding token, Garage's keys); what the site is comes from .env
# here, and wins over the same name in portal.env.
env_file: portal.env
environment:
PUBLIC_URL: https://${PORTAL_HOST}
KANIDM_URL: https://${ID_HOST}
CHAT_URL: https://${CHAT_HOST}
OAUTH2_CLIENT_ID: ${OAUTH2_CLIENT_ID}
COOKIE_SECURE: "true"
CONTENT_REPO: ${CONTENT_REPO}
CONTENT_BRANCH: ${CONTENT_BRANCH}
PEOPLE_BACKEND: ${PEOPLE_BACKEND}
RESPONSIBLE_GROUP: ${RESPONSIBLE_GROUP}
LEPTOS_SITE_ADDR: 0.0.0.0:3000
LEPTOS_SITE_ROOT: site
LEPTOS_HASH_FILES: "true"
@@ -121,8 +133,9 @@ services:
args:
GDO_RELEASE: ${GDO_RELEASE}
restart: unless-stopped
# NATS_URL, with the password: made by bootstrap.sh, never committed.
env_file: nats.env
environment:
NATS_URL: nats://portal:${NATS_PASSWORD}@nats:4222
# The host, from inside the container. Podman resolves this to the
# gateway; the host's postfix listens on 0.0.0.0:25.
SMTP_HOST: host.containers.internal
@@ -151,14 +164,14 @@ services:
image: docker.io/bendik/cnats:${CNATS_TAG:-no-tag-set}
restart: unless-stopped
env_file:
- nats.env
- 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}
PUBLIC_URL: https://${CHAT_HOST}
COOKIE_SECURE: "true"
ports:
- "127.0.0.1:3070:3000"