Update Error Nginx Refresh page

This commit is contained in:
ahmadafriadi 2025-06-30 13:41:44 +07:00
parent ba28cf49a0
commit 19fd1b5542
2 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,13 @@
# Build stage
# Build React
FROM node:18 AS build
WORKDIR /app
COPY . .
RUN npm install --legacy-peer-deps
RUN npm run build
# Serve stage
# Serve with Nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "tsc -b && vite build --base=/",
"preview": "vite preview"
},
"dependencies": {