fix: serve frontend assets below admin path
This commit is contained in:
@@ -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 ----
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user