From 491f41acdcca22497bbfa1c53ba4368ff64daffb Mon Sep 17 00:00:00 2001 From: Lee Hilton Date: Thu, 8 Oct 2026 11:12:19 -0700 Subject: [PATCH] fix(docker): ship public/ in the runtime image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The runtime stage of the multi-stage Dockerfile copies an explicit allowlist of directories (index.js/package.json, node_modules, src, config, bin, scripts) and omits public/. server.js reads public/dashboard.html at request time, so in every published image GET /dashboard has returned: 500 {"error":"dashboard_read_failed", ... ENOENT '/app/public/dashboard.html'} while the /dashboard/api/* routes — which are ordinary Express handlers and therefore present — keep answering 200. That asymmetry made the omission invisible: the API looks healthy, so nothing appeared broken. The allowlist was written in #28 (2026-01-30), four months before public/ was added in #65 (2026-05-19), and no Dockerfile revision has ever copied it. package.json's "files" already ships "public" to npm, so this change simply makes the Docker artifact agree with the npm artifact. Verified by building the image at 1243a46 with only this line added: GET /dashboard goes 500 (149 B) -> 200 (52686 B, text/html, Lynkr Dashboard), and the API routes stay 200. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 9870e43..654e237 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,7 @@ WORKDIR /app COPY --from=build --chown=node:node /app/index.js /app/package.json ./ COPY --from=build --chown=node:node /app/node_modules ./node_modules COPY --from=build --chown=node:node /app/src ./src +COPY --from=build --chown=node:node /app/public ./public COPY --from=build --chown=node:node /app/config ./config COPY --from=build --chown=node:node /app/bin ./bin COPY --from=build --chown=node:node /app/scripts/setup.js ./scripts/setup.js