build(dev): serve the dev State Store over TLS on the Docker bridge so task containers reach it

This commit is contained in:
sam committed 2026-10-17 17:19:08 +11:00
1 parent 86b3cb4fa9
commit 2bd723a6bf
3 files changed
+30 -3

No files matched your search

+20 -1
View File
@@ -179,6 +179,25 @@ tasks:
desc: Run development services and Vite at http://localhost:5173
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard, dev:ui]
dev:tls:
desc: Issue the development CA and service certificates deployments/dev.toml names
status:
- test -f tmp/dev-tls/archie-ui.pem
cmds:
- |
# Task containers reach the State Store over the Docker bridge, which
# services may only do over TLS.
set -eu
d=tmp/dev-tls
mkdir -p "$d"
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
-subj /CN=archie-dev-ca -keyout "$d/ca-key.pem" -out "$d/ca.pem" 2>/dev/null
for s in archied archie-gateway archie-messaging archie-state-store archie-ui; do
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
-subj "/CN=$s" -addext "subjectAltName=DNS:$s" -addext extendedKeyUsage=serverAuth,clientAuth \
-CA "$d/ca.pem" -CAkey "$d/ca-key.pem" -keyout "$d/$s-key.pem" -out "$d/$s.pem" 2>/dev/null
done
dev:postgres:
desc: Start PostgreSQL and wait for readiness
cmds:
@@ -215,7 +234,7 @@ tasks:
dev:state-store:
desc: Run the State Store with development PostgreSQL
deps: [dev:postgres]
deps: [dev:postgres, dev:tls]
cmds:
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml