diff --git a/deploy/docker/docker-compose.yml b/deploy/docker/docker-compose.yml index 106ab4d..4df8a47 100644 --- a/deploy/docker/docker-compose.yml +++ b/deploy/docker/docker-compose.yml @@ -4,12 +4,18 @@ # Usage: # docker compose -f deploy/docker/docker-compose.yml up -d --build # -# Volumes: -# betterframe-data: sqlite DB + secret.key -# nodered-data: Node-RED flows +# Volumes (override per-deployment via env — see Coolify "Environment"): +# BF_DATA_VOLUME_NAME default "betterframe-data" +# NODERED_DATA_VOLUME_NAME default "nodered-data" +# BF_HOST_PORT default 80 (host edge port mapped to angie) # -# Only 0.0.0.0:80 is published on the host. Backend services and Node-RED -# are reachable only from within the Docker network. +# Coolify ops: set these env vars on the resource so each deployment owns its +# own named volumes (e.g. "bf-prod-data" vs "bf-staging-data"). For host bind +# mounts or NFS / S3-CSI volumes, use Coolify's per-service "Storage" UI +# rather than templating driver_opts here — JSON injection via env is brittle. +# +# Only ${BF_HOST_PORT}:80 is published on the host. Backend services and +# Node-RED are reachable only from within the Docker network. version: "3.8" services: @@ -57,7 +63,7 @@ services: - server - nodered ports: - - "80:80" + - "${BF_HOST_PORT:-80}:80" volumes: - ../angie/betterframe.docker.conf:/etc/nginx/conf.d/default.conf:ro networks: @@ -86,8 +92,14 @@ services: - betterframe volumes: + # Top-level keys are the in-compose references used above. `name:` sets the + # actual docker volume name on the host so multiple Coolify deployments on + # the same host can share machine without name collisions. Default keeps + # backward compat with existing single-host deployments. betterframe-data: + name: ${BF_DATA_VOLUME_NAME:-betterframe-data} nodered-data: + name: ${NODERED_DATA_VOLUME_NAME:-nodered-data} networks: betterframe: