YAS/apps/api/Dockerfile
YetAnotherSuite Dev 0b174e38f5 fix: Docker build — install all workspace deps, not filtered
- 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
2026-07-20 23:20:52 +02:00

25 lines
686 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 --filter @yetanother/db exec prisma generate
RUN pnpm build --filter @yetanother/api
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/apps/api/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/db/prisma ./prisma
EXPOSE 4000
CMD ["node", "dist/main.js"]