5195901f01
Replace Python http.server with Express to handle: - Large IAP JWT headers that caused 500 errors - API request proxying with GCP identity tokens - Static React build serving with SPA fallback Update api.ts to use relative URLs in production for proxy routing.
17 lines
298 B
Docker
17 lines
298 B
Docker
# Build stage
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Production stage
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY --from=build /app/dist ./dist
|
|
COPY server.js .
|
|
RUN npm install express
|
|
EXPOSE 80
|
|
CMD ["node", "server.js"]
|