File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM node:20-alpine AS base
2+ WORKDIR /app
3+
4+ FROM base AS deps
5+ COPY package.json package-lock.json turbo.json ./
6+ COPY packages/shared/package.json packages/shared/
7+ COPY packages/db/package.json packages/db/
8+ COPY packages/queue/package.json packages/queue/
9+ COPY apps/worker/package.json apps/worker/
10+ RUN npm ci
11+
12+ FROM base AS builder
13+ COPY --from=deps /app/node_modules ./node_modules
14+ COPY . .
15+ RUN npx turbo run build --filter=@taskflow/worker
16+
17+ FROM base AS runner
18+ ENV NODE_ENV=production
19+ COPY --from=builder /app/node_modules ./node_modules
20+ COPY --from=builder /app/packages/shared/dist ./packages/shared/dist
21+ COPY --from=builder /app/packages/shared/package.json ./packages/shared/
22+ COPY --from=builder /app/packages/db/dist ./packages/db/dist
23+ COPY --from=builder /app/packages/db/package.json ./packages/db/
24+ COPY --from=builder /app/packages/queue/dist ./packages/queue/dist
25+ COPY --from=builder /app/packages/queue/package.json ./packages/queue/
26+ COPY --from=builder /app/apps/worker/dist ./apps/worker/dist
27+ COPY --from=builder /app/apps/worker/package.json ./apps/worker/
28+
29+ CMD ["node" , "apps/worker/dist/index.js" ]
You can’t perform that action at this time.
0 commit comments