From 6d6b6a0b590df7f4a9821b457d7ebdf9324ea1d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Oct 2026 01:09:28 +0800 Subject: [PATCH] fix: serve frontend assets below admin path --- Dockerfile | 1 + tests/test_deployment_contract.py | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5e5c299..509f73d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN corepack enable COPY web/package.json web/pnpm-lock.yaml web/pnpm-workspace.yaml ./ RUN pnpm install --frozen-lockfile COPY web/ ./ +ENV VITE_PUBLIC_PATH=/admin/ RUN pnpm run build # ---- Stage 2: build the Go backend ---- diff --git a/tests/test_deployment_contract.py b/tests/test_deployment_contract.py index c9acc88..53c9fb3 100644 --- a/tests/test_deployment_contract.py +++ b/tests/test_deployment_contract.py @@ -19,6 +19,7 @@ class DeploymentContractTest(unittest.TestCase): dockerfile = (ROOT / "Dockerfile").read_text() self.assertIn("RUN pnpm run build", dockerfile) + self.assertIn("VITE_PUBLIC_PATH=/admin/", dockerfile) self.assertIn("COPY --from=web-builder /web/dist ./web/dist", dockerfile) self.assertIn("COPY --from=web-builder /web/dist /app/web/dist", dockerfile) self.assertIn("EXPOSE 6061", dockerfile)