Add nginx config

This commit is contained in:
2025-08-26 16:18:04 +08:00
parent 3f2c37366e
commit fa35aa6c10
2 changed files with 21 additions and 0 deletions

View File

@@ -1,10 +1,14 @@
# Build stage
FROM node:22.12 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build -- --configuration production
# Serve stage
FROM nginx:alpine
COPY --from=build /app/dist/insurance-fe/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

17
nginx.conf Normal file
View File

@@ -0,0 +1,17 @@
server {
listen 80;
server_name insurance.hzwnrw.my;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri /index.html;
}
location /assets/ {
try_files $uri =404;
}
client_max_body_size 10M;
}