BetterFrame/sec-config.template.yaml
Mitchell R 9b4032ca8a
refactor: decommission SQLite + add UUIDv7 PK migration for existing PG
- Delete sqlite-adapter.ts and migrations.ts (SQLite path removed)
- Remove driver/sqlitePath from all config schemas + sec-config template
- init.ts now PG-only, no SQLite branch
- db-adapter.ts dialect narrowed to "postgres" only
- Add in-place UUIDv7 migration: detects INTEGER PKs in existing PG
  databases, drops FK constraints, ALTER COLUMN TYPE to TEXT for all
  15 entity tables + their FK columns, re-adds FK constraints. Idempotent
  (skips if already TEXT). Existing integer IDs become string "1", "2"
  etc — new inserts use proper UUIDv7 from repository.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 13:22:29 +02:00

99 lines
2.9 KiB
YAML

# BSB runtime configuration — template for Docker builds.
#
# Placeholders (${VAR}) are replaced by envsubst during docker build.
# Defaults come from Dockerfile ARG declarations, not from this file.
# Set overrides via Coolify build args or docker build --build-arg.
#
# For native (non-Docker) installs, copy to sec-config.yaml and
# replace ${VAR} placeholders with actual values.
default:
observable:
observable-default:
plugin: observable-default
enabled: true
config: {}
events:
events-default:
plugin: events-default
enabled: true
services:
service-admin-http:
package: betterframe
plugin: service-admin-http
enabled: true
config:
db:
host: ${BF_PG_HOST}
port: ${BF_PG_PORT}
database: ${BF_PG_DB}
user: ${BF_PG_USER}
password: ${BF_PG_PASSWORD}
poolMax: ${BF_PG_POOL_MAX}
host: 0.0.0.0
port: 18080
dataDir: /var/lib/betterframe
sessionIdleSeconds: 43200
sessionMaxSeconds: 2592000
loginLockoutThreshold: 8
loginLockoutSeconds: 900
argon2Memory: 65536
argon2TimeCost: 3
argon2Parallelism: 2
cookieName: betterframe_session
totpIssuer: BetterFrame
noderedUrl: ${BF_NODERED_URL}
selfUrl: ${BF_SELF_URL}
systemdCredsDir: ""
firmwareSigningKey: "${BF_FIRMWARE_SIGNING_KEY}"
firmwareImportApiKey: "${BF_FIRMWARE_IMPORT_API_KEY}"
otaImportApiKey: "${BF_OTA_IMPORT_API_KEY}"
service-api-http:
package: betterframe
plugin: service-api-http
enabled: true
config:
db:
host: ${BF_PG_HOST}
port: ${BF_PG_PORT}
database: ${BF_PG_DB}
user: ${BF_PG_USER}
password: ${BF_PG_PASSWORD}
poolMax: ${BF_PG_POOL_MAX}
host: 0.0.0.0
port: 18081
codeTtlSeconds: 600
dataDir: /var/lib/betterframe
argon2Memory: 65536
argon2TimeCost: 3
argon2Parallelism: 2
cookieName: betterframe_session
totpIssuer: BetterFrame
noderedUrl: ${BF_NODERED_URL}
mqttUrl: "${BF_MQTT_URL}"
mqttUsername: "${BF_MQTT_USERNAME}"
mqttPassword: "${BF_MQTT_PASSWORD}"
mqttTopicPrefix: ${BF_MQTT_TOPIC_PREFIX}
service-coordinator-ws:
package: betterframe
plugin: service-coordinator-ws
enabled: true
config:
db:
host: ${BF_PG_HOST}
port: ${BF_PG_PORT}
database: ${BF_PG_DB}
user: ${BF_PG_USER}
password: ${BF_PG_PASSWORD}
poolMax: ${BF_PG_POOL_MAX}
host: 0.0.0.0
port: 18082
dataDir: /var/lib/betterframe
argon2Memory: 65536
argon2TimeCost: 3
argon2Parallelism: 2
cookieName: betterframe_session
totpIssuer: BetterFrame
noderedUrl: ${BF_NODERED_URL}