24 lines
621 B
Docker
24 lines
621 B
Docker
# ---------- Build stage (Keep this the same) ----------
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# ---------- Diagnostic Production stage ----------
|
|
FROM python:3.11-slim
|
|
|
|
# Set the working directory to where the React files live
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
# Copy build output from the build stage
|
|
COPY --from=build /app/dist .
|
|
|
|
# Expose port 80 (Cloud Run expects this)
|
|
EXPOSE 80
|
|
|
|
# Run Python's built-in simple HTTP server
|
|
# This server is very "dumb" and will ignore/accept large IAP headers
|
|
CMD ["python", "-m", "http.server", "80"]
|