feat: add Dockerfile, docker-compose.yml, and nginx.conf for containerized deployment
This commit is contained in:
18
nest-intra/Dockerfile
Normal file
18
nest-intra/Dockerfile
Normal 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 5174
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
6
nest-intra/docker-compose.yml
Normal file
6
nest-intra/docker-compose.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
nest-intra:
|
||||
build: .
|
||||
ports:
|
||||
- "5174:5174"
|
||||
restart: unless-stopped
|
||||
9
nest-intra/nginx.conf
Normal file
9
nest-intra/nginx.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5174;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user