feat: add Dockerfile, docker-compose, and nginx configuration for application deployment

This commit is contained in:
Thibault Pouch
2026-02-27 10:38:29 +01:00
parent 6ed13d1ffc
commit 6b8039da28
3 changed files with 33 additions and 0 deletions

18
nest-front/Dockerfile Normal file
View File

@@ -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;"]

View File

@@ -0,0 +1,6 @@
services:
nest-front:
build: .
ports:
- "5173:5173"
restart: unless-stopped

9
nest-front/nginx.conf Normal file
View File

@@ -0,0 +1,9 @@
server {
listen 5173;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}