Files
bakery-ia/frontend/Dockerfile.kubernetes

22 lines
511 B
Docker
Raw Normal View History

2026-01-24 08:39:29 +01:00
# Frontend Dockerfile for Kubernetes
# Simple two-stage build: node for build, nginx for serve
2025-09-27 11:18:13 +02:00
2026-01-24 08:39:29 +01:00
# Stage 1: Build
2025-09-27 11:18:13 +02:00
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
2026-01-24 08:39:29 +01:00
RUN npm ci
2025-09-27 11:18:13 +02:00
COPY . .
ENV NODE_ENV=production
ENV VITE_API_URL=/api
ENV VITE_APP_TITLE="BakeWise"
ENV VITE_APP_VERSION="1.0.0"
2025-09-27 11:18:13 +02:00
RUN npm run build
2026-01-24 08:39:29 +01:00
# Stage 2: Serve with nginx
FROM nginx:1.25-alpine
2025-09-27 11:18:13 +02:00
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