mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 17:56:34 +00:00
Coolify deployments don't always carry the full source tree on disk at the bind-mount source path. Mounting a missing file lets Docker auto-create a directory at the target, which then fails to mount over the file the image expects. Fix: bake config files into the images themselves: - Dockerfile.server COPYs deploy/docker/sec-config.yaml → /app/server/. Env vars (BF_*) still override at runtime per env-overrides.ts. - New Dockerfile.angie wraps nginx:alpine + baked betterframe.docker.conf. - Dockerfile.nodered COPYs nodered-settings.js to /usr/src/bf-settings.js (outside the /data volume) and uses --settings to point at it. Compose drops the three bind mounts; volumes are now strictly runtime state (DB + secrets, Node-RED flows). Users who want a different sec-config still get full control via env overrides or Coolify's Storage UI.
26 lines
986 B
Docker
26 lines
986 B
Docker
# BetterFrame Node-RED image with bundled BF nodes preinstalled.
|
|
#
|
|
# Extends official nodered/node-red, installs the workspace nodered/
|
|
# package at /usr/src/betterframe-nodes. settings.js points nodesDir
|
|
# there so Node-RED scans it on boot. Survives /data volume mount.
|
|
|
|
FROM nodered/node-red:latest
|
|
|
|
USER root
|
|
|
|
# Copy our nodes into a path outside /data (which is volume-mounted)
|
|
COPY nodered /usr/src/betterframe-nodes
|
|
|
|
# Settings file at a non-/data path so the nodered-data volume doesn't
|
|
# overlay it. CMD passes --settings to point Node-RED at it.
|
|
COPY deploy/docker/nodered-settings.js /usr/src/bf-settings.js
|
|
|
|
# Install deps for the nodes
|
|
RUN cd /usr/src/betterframe-nodes && \
|
|
npm install --omit=dev && \
|
|
chown -R node-red:root /usr/src/betterframe-nodes /usr/src/bf-settings.js
|
|
|
|
USER node-red
|
|
|
|
# Override the default CMD to use the baked settings.js.
|
|
CMD ["npm", "start", "--cache", "/data/.npm", "--", "--userDir", "/data", "--settings", "/usr/src/bf-settings.js"]
|