admin pannel k8s

This commit is contained in:
tusuii
2026-02-19 18:53:04 +05:30
parent 94d0aabec6
commit ba2831d491
7 changed files with 174 additions and 2 deletions

View File

@@ -4,10 +4,17 @@ FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ci
COPY . .
# Build-time env vars (Vite embeds these into the compiled JS bundle)
# Pass via: docker build --build-arg VITE_API_URL=https://api.yourdomain.com .
ARG VITE_API_URL=http://localhost:3000/api
ARG VITE_APP_NAME="VC E-Commerce Admin Panel"
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_APP_NAME=$VITE_APP_NAME
RUN npm run build
@@ -15,7 +22,8 @@ RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 5174
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]