diff --git a/nest-front/Dockerfile b/nest-front/Dockerfile new file mode 100644 index 0000000..202c534 --- /dev/null +++ b/nest-front/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22-alpine AS build + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm ci + +COPY . . +RUN npm run build + +FROM nginx:alpine + +COPY --from=build /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 5173 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/nest-front/docker-compose.yml b/nest-front/docker-compose.yml new file mode 100644 index 0000000..0428972 --- /dev/null +++ b/nest-front/docker-compose.yml @@ -0,0 +1,6 @@ +services: + nest-front: + build: . + ports: + - "5173:5173" + restart: unless-stopped diff --git a/nest-front/nginx.conf b/nest-front/nginx.conf new file mode 100644 index 0000000..36fb97e --- /dev/null +++ b/nest-front/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 5173; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +}