Files
PlantPal/plant-browser/Dockerfile
programmingPug 0f190a3f26 Major rewrite
2025-01-14 14:47:10 -05:00

26 lines
513 B
Docker

# Stage 1: Build the Angular application
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build --prod
# Stage 2: Serve the Angular app using NGINX
FROM nginx:stable-alpine AS runtime
COPY --from=build /app/dist/plant-browser/browser /usr/share/nginx/html
# Remove the default NGINX configuration
RUN rm /etc/nginx/conf.d/default.conf
# Copy custom NGINX configuration
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]