Fix dev compose: preserve node_modules via named volumes

Mounting ./server:/app/server overwrote the npm-installed node_modules
from the Docker build. Named volumes for server/client node_modules
shadow the bind mount so installed packages are preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 19:24:37 -04:00
parent 6cf7f36f0e
commit e98abe632a

View File

@@ -2,8 +2,14 @@ services:
app: app:
volumes: volumes:
- ./server:/app/server - ./server:/app/server
- server_node_modules:/app/server/node_modules
- ./client:/app/client - ./client:/app/client
- client_node_modules:/app/client/node_modules
ports: ports:
- "5173:5173" - "5173:5173"
environment: environment:
NODE_ENV: development NODE_ENV: development
volumes:
server_node_modules:
client_node_modules: