Files
ISMAIL MASSERAN d0f5d4c979
Build Docker Image / build-backend (push) Successful in 6s
Build Docker Image / build-admin (push) Successful in 7s
Build Docker Image / build-teller (push) Successful in 5s
Build Docker Image / build-customer (push) Successful in 12s
DONE: update to use ip for the api in frontend
2026-07-26 14:08:13 +08:00

22 lines
503 B
Docker

# Build stage
FROM node:20-bookworm AS build
WORKDIR /app
ARG VITE_API_URL=http://localhost:8080
ARG VITE_BRANCH_QR_BASE_URL=http://localhost:3000
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_BRANCH_QR_BASE_URL=$VITE_BRANCH_QR_BASE_URL
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Runtime stage — static SPA
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]