- Added PatchedProduct, PatchedProductImage, PatchedRefund, and related models. - Introduced Payment, PaymentBody, PaymentCreate, and PaymentRead models. - Created enums for payment methods, reasons for refunds, roles, and shipping methods. - Implemented models for site configurations and their opening hours. - Added ZasilkovnaPacket and ZasilkovnaShipment models for handling shipping data. - Generated user registration model with validation rules. - Updated public API functions to support new models and queries.
18 lines
510 B
Docker
18 lines
510 B
Docker
# Step 1: Build React (Vite) app
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
# If package-lock.json exists, npm ci is faster and reproducible
|
|
RUN npm ci || npm install
|
|
COPY . .
|
|
ENV NODE_ENV=production
|
|
# Skip Orval - use pre-generated files committed to git
|
|
ENV SKIP_ORVAL=true
|
|
RUN npm run build
|
|
|
|
# Step 2: Nginx runtime
|
|
FROM nginx:1.27-alpine
|
|
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |