36 lines
913 B
YAML
36 lines
913 B
YAML
services:
|
|
backend-dev:
|
|
image: node:25-slim
|
|
working_dir: /app
|
|
command: sh -c "npm install && npm run dev"
|
|
volumes:
|
|
- ./backend:/app
|
|
- backend_node_modules:/app/node_modules
|
|
- ./backend/data:/app/data
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "3000:3000"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:3000/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))\""]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
frontend-dev:
|
|
image: node:25-slim
|
|
working_dir: /app
|
|
command: sh -c "npm install && npm run dev -- --host --port 5173"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- frontend_node_modules:/app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
depends_on:
|
|
- backend-dev
|
|
|
|
volumes:
|
|
backend_node_modules:
|
|
frontend_node_modules:
|