Files
brushing-buddy/Dockerfile
T

14 lines
353 B
Docker

# Stage 1: Build the React application
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: Serve the app with Nginx
FROM nginx:alpine
# Vite outputs the compiled app to the 'dist' folder
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]