mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
All runtime config now flows exclusively through BSB plugin config (this.config.*) or shared module parameters. No more env var overrides. Changes: - Delete shared/env-overrides.ts (envStr/envBool/envInt helpers) - version.ts: remove env var chain, keep only .bf-version file + "dev" - firmware.ts: replace BF_FIRMWARE_SIGNING_KEY env with config.signingKeyPem parameter, remove tryParsePrivateKey helper - secrets.ts: replace process.env.CREDENTIALS_DIRECTORY with config.systemdCredsDir - mqtt-bridge.ts: accept MqttConfig object instead of reading process.env - service-store: replace envStr calls with this.config.*, build pgUrl from config fields, add pgPoolMax config - pg-adapter.ts: accept poolMax constructor param instead of env var - service-admin-http: add firmwareSigningKey, firmwareImportApiKey, otaImportApiKey, systemdCredsDir config fields; pass to shared modules - middleware.ts: replace tokenMatchesEnv with tokenMatchesExpected using deps.firmwareImportApiKey/otaImportApiKey - service-api-http: add mqttUrl/mqttUsername/mqttPassword/mqttTopicPrefix config fields; pass to initMqttBridge - service-coordinator-ws: replace envStr calls with this.config.* - sec-config.yaml: add all new config fields with sensible defaults - docker-compose.coolify.yml: remove all BF_* env vars from server service Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
112 lines
2.8 KiB
YAML
112 lines
2.8 KiB
YAML
# BetterFrame Coolify variant — Coolify's Traefik fronts the stack, so
|
|
# no host port is published from the compose. Angie still receives traffic
|
|
# from Traefik on container port 80 (via the betterframe network).
|
|
#
|
|
# Point Coolify resource at this file instead of docker-compose.yml.
|
|
#
|
|
# Volume name overrides:
|
|
# BF_DATA_VOLUME_NAME default "betterframe-data"
|
|
# NODERED_DATA_VOLUME_NAME default "nodered-data"
|
|
#
|
|
# Server config comes from sec-config.yaml, not env vars.
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/Dockerfile.server
|
|
args:
|
|
BF_SERVER_VERSION: ${BF_SERVER_VERSION:-${COOLIFY_GIT_COMMIT:-${SOURCE_COMMIT:-dev}}}
|
|
container_name: betterframe-server
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=UTC
|
|
volumes:
|
|
- betterframe-data:/var/lib/betterframe
|
|
expose:
|
|
- "18080"
|
|
- "18081"
|
|
- "18082"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:18080/healthz || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- betterframe
|
|
|
|
angie:
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/Dockerfile.angie
|
|
container_name: betterframe-angie
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- server
|
|
- nodered
|
|
# No `ports:` — Coolify's Traefik routes ${SERVICE_FQDN_ANGIE_80} → 80.
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- betterframe
|
|
|
|
nodered:
|
|
build:
|
|
context: .
|
|
dockerfile: deploy/docker/Dockerfile.nodered
|
|
container_name: betterframe-nodered
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=UTC
|
|
volumes:
|
|
- nodered-data:/data
|
|
expose:
|
|
- "1880"
|
|
healthcheck:
|
|
# Node-RED root admin path returns 200 once the runtime is up.
|
|
test: ["CMD-SHELL", "wget -q --spider http://localhost:1880/nrdp/ || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 90s
|
|
networks:
|
|
- betterframe
|
|
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
container_name: betterframe-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=${BF_PG_USER:-betterframe}
|
|
- POSTGRES_PASSWORD=${BF_PG_PASSWORD:-betterframe}
|
|
- POSTGRES_DB=${BF_PG_DB:-betterframe}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql
|
|
expose:
|
|
- "5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${BF_PG_USER:-betterframe}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
networks:
|
|
- betterframe
|
|
|
|
volumes:
|
|
betterframe-data:
|
|
name: ${BF_DATA_VOLUME_NAME:-betterframe-data}
|
|
nodered-data:
|
|
name: ${NODERED_DATA_VOLUME_NAME:-nodered-data}
|
|
postgres-data:
|
|
name: ${BF_PG_VOLUME_NAME:-betterframe-postgres}
|
|
|
|
networks:
|
|
betterframe:
|
|
driver: bridge
|