admin pannel k8s
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -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;"]
|
||||
|
||||
Reference in New Issue
Block a user