kron beside portal: the money service, Vipps MobilePay, wired but not started

A `kron:` service on the vel's own NATS, its keys in kron.env and
nowhere else, published on 127.0.0.1:3080 for the host Caddy
(host-caddy/kron.vel.klingenbergbygg.no), and PAY_URL on portal so the
lint allows `payment:` without `by_hand`. kron.env.example names the
five settings; register-vipps-webhook.sh registers <PUBLIC_URL>/webhook
with Vipps and writes the secret it answers with into kron.env without
showing it. The README's Money section is the order to do it in.

On a branch, not main: deploy-tomtervel resets the checkout to
origin/main and brings the whole project up, and a kron service whose
env_file is not on the host yet would stop everything else with it.
Merge once kron.env is in place and bendik/kron has a tag to pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDkR5YogvJGebPtogQT
This commit is contained in:
blandClaude Fable 5.1 committed 2026-11-04 18:05:26 +01:00
1 parent f307d72907
commit a93f35792f
7 files changed
+128

No files matched your search

+27
View File
@@ -95,6 +95,11 @@ services:
# The namespace of everything this site keeps on NATS from portal 0.9.
# Must not change: a new name is a new, empty site.
SITE_NAME: tomtervel
# The money service is there: the lint then allows `payment:` without
# `by_hand: true`. Nothing at run time reads it - a request is
# published whenever the content did not say by_hand - so the same
# variable has to be set where the content repo's lint runs.
PAY_URL: http://kron:3000
volumes:
- learn_cache:/app/learn-cache
ports:
@@ -135,6 +140,28 @@ services:
nats:
condition: service_healthy
# The money service. Portal decides what is owed - a `payment:` on a
# state in the content - and publishes the request on this NATS; kron
# is what asks Vipps MobilePay for it, pushes it to the person's app,
# and says on the same NATS what became of it. One kron per site, its
# keys in kron.env and nowhere else. Host-published for kasse's host
# Caddy (kron.vel.klingenbergbygg.no -> here): Vipps has to reach
# /webhook over public HTTPS, and a person who paid by link lands on
# /returned/<id>.
kron:
image: docker.io/bendik/kron:${KRON_RELEASE}
restart: unless-stopped
env_file: kron.env
environment:
NATS_URL: nats://portal:${NATS_PASSWORD}@nats:4222
SITE_NAME: tomtervel
PUBLIC_URL: https://kron.${PORTAL_HOST}
ports:
- "127.0.0.1:3080:3000"
depends_on:
nats:
condition: service_healthy
# The Gitea Actions runner is a host service on kasse (pacman gitea-runner),
# registered against prosjekt.klingenbergbygg.no. It reaches this NATS via the
# published 127.0.0.1:4222 port above, so no in-compose runner — and no