feat: add SPA, serve at /app/, update Dockerfile and README
- React + TanStack Router + shadcn/ui SPA under spa/ - serve spa/dist at /app/ with index.html fallback for client routing - Dockerfile: node build stage for SPA, copy dist into runtime image - README: document SPA, CORS_ORIGINS env var, architecture entry - vite base set to /app/, manifest.json paths fixed
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
# ----- spa -----
|
||||
FROM node:22-slim AS spa-builder
|
||||
WORKDIR /spa
|
||||
COPY spa/package.json spa/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY spa/ .
|
||||
RUN npm run build
|
||||
|
||||
# ----- build -----
|
||||
FROM rust:slim-bookworm AS builder
|
||||
|
||||
@@ -81,6 +89,7 @@ WORKDIR /app
|
||||
COPY --from=builder /build/target/release/presentation ./presentation
|
||||
COPY --from=builder /build/target/release/worker ./worker
|
||||
COPY static ./static
|
||||
COPY --from=spa-builder /spa/dist ./spa/dist
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user