Files
bakery-ia/frontend/Dockerfile.kubernetes

22 lines
511 B
Docker

# Frontend Dockerfile for Kubernetes
# Simple two-stage build: node for build, nginx for serve
# Stage 1: Build
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
ENV NODE_ENV=production
ENV VITE_API_URL=/api
ENV VITE_APP_TITLE="BakeWise"
ENV VITE_APP_VERSION="1.0.0"
RUN npm run build
# Stage 2: Serve with nginx
FROM nginx:1.25-alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 3000