The ./server bind mount overwrites /app/server including node_modules installed during the Docker build. Running npm install on startup ensures deps are present after the volume mount. Also reverts the node_modules named-volume workaround in favor of this cleaner approach (requires node installed locally for non-Docker dev). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
218 B
YAML
11 lines
218 B
YAML
services:
|
|
app:
|
|
volumes:
|
|
- ./server:/app/server
|
|
- ./client:/app/client
|
|
ports:
|
|
- "5173:5173"
|
|
environment:
|
|
NODE_ENV: development
|
|
command: sh -c "npm install && node src/index.js"
|