From 2a3c411c9b1cafbce844b7bd119e4defaccac933 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Oct 2026 15:06:53 +0800 Subject: [PATCH] fix: serve integrated frontend from root --- Dockerfile | 2 +- tests/test_deployment_contract.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9bddc6..e843d59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +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/ +ENV VITE_PUBLIC_PATH=/ 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 53c9fb3..344be40 100644 --- a/tests/test_deployment_contract.py +++ b/tests/test_deployment_contract.py @@ -19,7 +19,8 @@ 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("ENV VITE_PUBLIC_PATH=/", dockerfile) + self.assertNotIn("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)