-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.45 KB
/
docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Docker Compose for OrgTree development
# Usage: docker-compose up
services:
# =============================================================================
# Development environment - hot reload for both frontend and backend
# =============================================================================
app:
build:
context: .
target: development
ports:
- '5173:5173' # Frontend (Vite)
- '3001:3001' # Backend (Express)
volumes:
# Mount source code for hot reload
- .:/app
# Preserve node_modules from container
- /app/node_modules
- /app/server/node_modules
# Persist SQLite database
- orgtree-data:/app/server
environment:
- NODE_ENV=development
- JWT_SECRET=docker-dev-secret-change-in-production
- VITE_API_URL=http://localhost:3001
command: >
sh -c "
npm run dev &
cd server && npm run dev
"
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3001/api/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
orgtree-data:
driver: local
# =============================================================================
# Production configuration (use: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up)
# =============================================================================
# See docker-compose.prod.yml for production overrides