The walking-skeleton Dockerfile built from a ./apps/api context and could not
work in a pnpm workspace: the lockfile lives at the repo root, pnpm 11 refused
esbuild's build script without the root pnpm-workspace.yaml, the dev stage never
compiled src->dist, and the production stage had invalid COPY syntax referencing
a path outside its context.
Switch to the correct monorepo pattern: build from the repo-root context, copy
the workspace manifest + lockfile + both package.jsons, and install with
--frozen-lockfile --filter @familysync/api... Reorder stages so production is
default; dev reuses builder output. Fix the dev volume mount path.
Surfaced while clearing the Task 3 checkpoint (stack bring-up): drizzle-kit push
applied the 4 tables and /health returned {ok:true,db:up} end-to-end.
20 lines
386 B
YAML
20 lines
386 B
YAML
# Local dev overrides — use with: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
|
|
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/api/Dockerfile
|
|
target: dev
|
|
volumes:
|
|
- ./apps/api/src:/app/apps/api/src
|
|
environment:
|
|
NODE_ENV: development
|
|
|
|
mariadb:
|
|
ports:
|
|
- "3306:3306"
|
|
|
|
redis:
|
|
ports:
|
|
- "6379:6379"
|