From b2f500500ed276f7a743f77d062727e418d6ecd9 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> Date: Mon, 18 May 2026 09:54:14 +0000 Subject: [PATCH] =?UTF-8?q?Task=20#587:=20Fix=20Docker=20build=20=E2=80=94?= =?UTF-8?q?=20copy=20version.json=20into=20build=20stage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The api-server docker build failed on the Mac with: ERROR: Could not resolve "../../../../version.json" src/routes/system.ts:4 `version.json` lives at the repo root and is tracked in git, but `docker/api-server.Dockerfile` never copied it into the `build` stage, so esbuild (running in /app/artifacts/api-server) couldn't resolve the `../../../../version.json` import added by commit 80429920. Fix: added `COPY version.json ./` in the build stage, right after the tsconfig copy and before `lib`/`scripts`/`artifacts` are copied. No runtime change is needed — esbuild inlines the JSON into the bundle via the `with { type: "json" }` import attribute, so the runtime stage does not need the file on disk. Local dev (`pnpm --filter @workspace/api-server run dev`) is unaffected because it builds outside Docker against the real repo root. tx-os Dockerfile not touched. Mac side after pulling this commit: cd ~/Downloads/TX && git pull && docker compose up -d --build api --- docker/api-server.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/api-server.Dockerfile b/docker/api-server.Dockerfile index 67d5fcd4..dc9a922b 100644 --- a/docker/api-server.Dockerfile +++ b/docker/api-server.Dockerfile @@ -33,6 +33,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ FROM deps AS build COPY tsconfig.base.json* tsconfig.json* ./ +COPY version.json ./ COPY lib lib COPY scripts scripts COPY artifacts/api-server artifacts/api-server