Root package.json no longer a workspace member — no src/, no 38 shared dependencies. Root is now workspace config with dev tooling only (biome, drizzle-kit, tsx, typescript). This means Dockerfiles only need: - pnpm-workspace.yaml + pnpm-lock.yaml + package.json (workspace config) - The specific service being built - Only vendor/ packages that service actually depends on (discord-gateway → discord.js-selfbot-v13) Before: each Dockerfile copied src/, vendor/*, packages/*, all services/ After: each Dockerfile copies only its service + needed vendor deps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
440 B
Docker
27 lines
440 B
Docker
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy workspace files
|
|
COPY pnpm-workspace.yaml .
|
|
COPY pnpm-lock.yaml .
|
|
COPY package.json .
|
|
|
|
# Copy service
|
|
COPY services/backend ./services/backend
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Build backend
|
|
RUN pnpm --filter './services/backend' run build
|
|
|
|
# Expose port
|
|
EXPOSE 3001
|
|
|
|
# Start backend
|
|
CMD ["node", "services/backend/dist/index.js"]
|