Spaces:
Sleeping
Sleeping
# Build | |
FROM node:20-alpine AS builder | |
WORKDIR /app | |
COPY package.json ./ | |
COPY package-lock.json* ./ | |
RUN npm ci | |
COPY . . | |
ARG VITE_API_BASE_URL=https://muryshev-generic-chatbot-backend.hf.space | |
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL | |
RUN npm run build | |
# Production | |
FROM nginx:alpine | |
WORKDIR /usr/share/nginx/html | |
COPY --from=builder /app/dist . | |
COPY devops/nginx.default.conf /etc/nginx/conf.d/default.conf | |
ENV PORT=7860 | |
EXPOSE ${PORT} | |
CMD ["nginx", "-g", "daemon off;"] |