fix(01-01): build Docker image from repo-root pnpm workspace context
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.
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
context: ./apps/api
|
||||
context: .
|
||||
dockerfile: apps/api/Dockerfile
|
||||
target: dev
|
||||
volumes:
|
||||
- ./apps/api/src:/app/src
|
||||
- ./apps/api/src:/app/apps/api/src
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
|
||||
|
||||
Reference in New Issue
Block a user