| # Build stage | |
| FROM node:18-alpine AS build | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY client/package*.json ./ | |
| # Install dependencies | |
| RUN npm ci | |
| # Copy source code | |
| COPY client/ ./ | |
| # Build the app | |
| RUN npm run build | |
| # Production stage | |
| FROM nginx:alpine | |
| # Copy built app to nginx | |
| COPY --from=build /app/build /usr/share/nginx/html | |
| # Copy nginx configuration | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| # Expose port | |
| EXPOSE 80 | |
| # Start nginx | |
| CMD ["nginx", "-g", "daemon off;"] | |
| # rebuild trigger 2025-09-02T05:59:28Z | |