Files

31 lines
502 B
Docker
Raw Permalink Normal View History

2025-12-14 02:38:35 +07:00
FROM node:20-alpine as build
WORKDIR /app
# Install dependencies
2025-12-15 03:22:29 +07:00
COPY package.json package-lock.json ./
RUN npm ci --network-timeout 300000
2025-12-14 02:38:35 +07:00
# Copy source
COPY . .
# Build argument for API URL
ARG VITE_API_URL=/api/v1
ENV VITE_API_URL=$VITE_API_URL
# Build
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]