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
532 B
Docker
27 lines
532 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/frontend ./services/frontend
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Build frontend
|
|
RUN pnpm --filter './services/frontend' run build
|
|
|
|
# Expose port (served by backend)
|
|
EXPOSE 3000
|
|
|
|
# Start frontend (production preview)
|
|
CMD ["pnpm", "--filter", "./services/frontend", "run", "preview", "--", "--host", "0.0.0.0"]
|