This commit is contained in:
Mat Rawi
2025-08-29 11:03:25 +08:00
4 changed files with 24 additions and 3 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;
}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "insurance-fe",
"version": "0.0.14",
"version": "0.0.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "insurance-fe",
"version": "0.0.14",
"version": "0.0.15",
"dependencies": {
"@angular/cdk": "^20.2.0",
"@angular/common": "^20.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "insurance-fe",
"version": "0.0.14",
"version": "0.0.15",
"scripts": {
"ng": "ng",
"start": "ng serve",