add dockerfile for lms adm frontend build

This commit is contained in:
2026-07-07 17:32:44 +09:00
parent d682e9a382
commit a940e02f75
2 changed files with 32 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+17
View File
@@ -0,0 +1,17 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location = /health {
access_log off;
add_header Content-Type text/plain;
return 200 "ok\n";
}
}