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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user