- enforce localhost:5174 for wheel campaign client URL in local development - lock vite dev server ports using strictPort on admin (5173) and client (5174) - sanitize .env.example and remove hardcoded staging domain - configure root dev orchestration and docker multi-stage build context
27 lines
559 B
Docker
27 lines
559 B
Docker
FROM node:20-alpine AS builder
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable pnpm
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
ARG VITE_CLIENT_PUBLIC_URL=
|
|
ENV VITE_CLIENT_PUBLIC_URL=$VITE_CLIENT_PUBLIC_URL
|
|
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN pnpm --filter @lucky-wheel/api exec prisma generate
|
|
RUN pnpm run build:types
|
|
RUN pnpm --filter @lucky-wheel/admin build
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html
|
|
COPY apps/admin/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|