fix: docker build - use root context for monorepo workspaces

- Change build context from ./frontend|backend to root (.)
- Update Dockerfiles to copy from correct paths
- Use npm install instead of npm ci (workspaces share root lockfile)
- Remove obsolete version attribute from docker-compose.yml

Fixes npm ci errors when package-lock.json is at workspace root.
This commit is contained in:
2026-04-14 15:45:27 -04:00
parent 20d1f216a0
commit d2e20ad82a
3 changed files with 36 additions and 30 deletions
+4 -6
View File
@@ -1,5 +1,3 @@
version: '3.8'
services:
postgres:
image: postgres:16-alpine
@@ -37,8 +35,8 @@ services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
context: .
dockerfile: backend/Dockerfile
container_name: coop-backend
environment:
- NODE_ENV=production
@@ -69,8 +67,8 @@ services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
context: .
dockerfile: frontend/Dockerfile
container_name: coop-frontend
environment:
- NEXT_PUBLIC_API_URL=http://localhost:3001