- API Dockerfile: install all workspace packages with Scope: all 11 workspace projects Already up to date Done in 596ms using pnpm v11.15.1 (without filter) so prisma CLI is available - Web Dockerfile: same fix for consistency - Copy full apps/ directory during deps stage
21 lines
562 B
Docker
21 lines
562 B
Docker
FROM node:22-alpine AS base
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
FROM base AS deps
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
|
|
COPY tooling/ ./tooling/
|
|
COPY packages/ ./packages/
|
|
COPY apps/ ./apps/
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
FROM deps AS builder
|
|
WORKDIR /app
|
|
RUN pnpm build --filter @yetanother/web
|
|
|
|
FROM nginx:alpine AS runner
|
|
COPY --from=builder /app/apps/web/dist /usr/share/nginx/html
|
|
COPY apps/web/nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|