Add Docker and Nginx config for frontend, backend, and MongoDB

This commit is contained in:
Francesco Lorenzo D'Amico
2026-03-19 11:27:14 +01:00
parent c983b6c42f
commit d525e8476d
6 changed files with 142 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
ARG VITE_API_URL=""
ENV VITE_API_URL=$VITE_API_URL
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]