fix(config): update sec-config for Docker networking

Bind 0.0.0.0 (not 127.0.0.1) so services are reachable across
containers. Use Docker container hostnames (nodered, server, postgres)
instead of localhost. Added missing cookieName + totpIssuer to
api-http and coordinator-ws configs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mitchell R 2026-05-24 00:03:45 +02:00
parent 238aa4f9af
commit ffe448463a
No known key found for this signature in database

View file

@ -1,11 +1,10 @@
# BSB runtime configuration for BetterFrame server. # BSB runtime configuration for BetterFrame server.
# #
# Profile: 'default' — single-host install where the server, node-red, and # This file is bind-mounted into the container at /home/bsb/sec-config.yaml.
# (optionally) one kiosk all run on the same Pi. For multi-kiosk deployments # All server config lives here — no env vars in the application code.
# the server is the same; kiosks have their own runtime config.
# #
# Override individual values via env: BSB_<plugin>_<key>=value (consult BSB # For native (non-Docker) installs, adjust hostnames to 127.0.0.1 and
# docs for the exact env-override semantics for v9). # set driver: sqlite if not using PostgreSQL.
default: default:
observable: observable:
@ -24,7 +23,9 @@ default:
enabled: true enabled: true
config: config:
driver: postgres driver: postgres
# SQLite (native installs)
sqlitePath: /var/lib/betterframe/betterframe.db sqlitePath: /var/lib/betterframe/betterframe.db
# PostgreSQL (Docker / production)
pgHost: postgres pgHost: postgres
pgPort: 5432 pgPort: 5432
pgDatabase: betterframe pgDatabase: betterframe
@ -32,29 +33,32 @@ default:
pgPassword: betterframe pgPassword: betterframe
pgPoolMax: 10 pgPoolMax: 10
# ----- Admin UI + API (includes secrets + auth config) ----- # ----- Admin UI + API -----
service-admin-http: service-admin-http:
plugin: service-admin-http plugin: service-admin-http
enabled: true enabled: true
config: config:
host: 127.0.0.1 host: 0.0.0.0
port: 18080 port: 18080
# Secrets (was service-secrets)
dataDir: /var/lib/betterframe dataDir: /var/lib/betterframe
# Auth (was service-auth) # Auth
sessionIdleSeconds: 43200 # 12h sessionIdleSeconds: 43200
sessionMaxSeconds: 2592000 # 30d sessionMaxSeconds: 2592000
loginLockoutThreshold: 8 loginLockoutThreshold: 8
loginLockoutSeconds: 900 # 15m loginLockoutSeconds: 900
argon2Memory: 65536 # KiB; tuned for Pi5 ~100ms argon2Memory: 65536
argon2TimeCost: 3 argon2TimeCost: 3
argon2Parallelism: 2 argon2Parallelism: 2
cookieName: betterframe_session cookieName: betterframe_session
totpIssuer: BetterFrame totpIssuer: BetterFrame
noderedUrl: http://127.0.0.1:1880 # Inter-service URLs (Docker container names)
selfUrl: http://127.0.0.1:18080 noderedUrl: http://nodered:1880
selfUrl: http://server:18080
# Systemd credentials directory (native installs only)
systemdCredsDir: "" systemdCredsDir: ""
# Firmware signing key (PEM). Leave empty to auto-generate on disk.
firmwareSigningKey: "" firmwareSigningKey: ""
# Bearer tokens for CI import endpoints. Generate with: openssl rand -base64 32
firmwareImportApiKey: "" firmwareImportApiKey: ""
otaImportApiKey: "" otaImportApiKey: ""
@ -63,14 +67,17 @@ default:
plugin: service-api-http plugin: service-api-http
enabled: true enabled: true
config: config:
host: 127.0.0.1 host: 0.0.0.0
port: 18081 port: 18081
codeTtlSeconds: 600 # 10m pairing code TTL codeTtlSeconds: 600
dataDir: /var/lib/betterframe dataDir: /var/lib/betterframe
argon2Memory: 65536 argon2Memory: 65536
argon2TimeCost: 3 argon2TimeCost: 3
argon2Parallelism: 2 argon2Parallelism: 2
noderedUrl: http://127.0.0.1:1880 cookieName: betterframe_session
totpIssuer: BetterFrame
noderedUrl: http://nodered:1880
# MQTT telemetry bridge (optional)
mqttUrl: "" mqttUrl: ""
mqttUsername: "" mqttUsername: ""
mqttPassword: "" mqttPassword: ""
@ -81,10 +88,12 @@ default:
plugin: service-coordinator-ws plugin: service-coordinator-ws
enabled: true enabled: true
config: config:
host: 127.0.0.1 host: 0.0.0.0
port: 18082 port: 18082
noderedUrl: http://127.0.0.1:1880
dataDir: /var/lib/betterframe dataDir: /var/lib/betterframe
argon2Memory: 65536 argon2Memory: 65536
argon2TimeCost: 3 argon2TimeCost: 3
argon2Parallelism: 2 argon2Parallelism: 2
cookieName: betterframe_session
totpIssuer: BetterFrame
noderedUrl: http://nodered:1880