frontend/Dockerfile
Bhavnoor Singh Saroya c297ad6085
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled
fresh start
2025-08-25 12:41:18 -07:00

27 lines
490 B
Docker

# Build Stage
FROM node:18 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Serve Stage
FROM nginx:stable-alpine
# Copy built frontend into nginx public folder
COPY --from=build /app/dist /usr/share/nginx/html
# Remove default Nginx config
RUN rm /etc/nginx/conf.d/default.conf
# Add custom Nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80 (not 8080 inside container)
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]