This commit is contained in:
arrelin
2025-12-15 18:43:14 +03:00
parent 6966fbbc2c
commit 20ad9f5833
4 changed files with 92 additions and 7 deletions

View File

@@ -1,13 +1,23 @@
FROM node:20-alpine
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 5173
ARG VITE_API_BASE_URL=/
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
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 80
CMD ["nginx", "-g", "daemon off;"]