-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
118 lines (97 loc) · 2.71 KB
/
docker-compose.dev.yml
File metadata and controls
118 lines (97 loc) · 2.71 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.8'
services:
# DomMate Application (Development)
dommate-dev:
build:
context: .
dockerfile: Dockerfile
target: production
image: dommate:dev
container_name: dommate-dev
restart: unless-stopped
# Environment variables for development
environment:
- NODE_ENV=development
- SERVER_HOST=0.0.0.0
- SERVER_PORT=3001
- DATABASE_PATH=/app/data/domains.db
- LOG_FILE=/app/logs/dommate.log
- DEBUG_MODE=true
- LOG_LEVEL=debug
- ENABLE_DEV_MIDDLEWARE=true
# Port mapping
ports:
- "3001:3001"
# Volume mounts for development
volumes:
- ./docker-data/dev/data:/app/data
- ./docker-data/dev/logs:/app/logs
- ./docker-data/dev/backups:/app/backups
- ./docker-data/dev/temp:/app/temp
# Mount source code for hot reload (if needed)
- ./server:/app/server:ro
# Mount environment file
- ./env.development:/app/.env:ro
# Health check (shorter intervals for dev)
healthcheck:
test: ["CMD", "node", "-e", "const http = require('http'); const options = { host: 'localhost', port: 3001, path: '/health', timeout: 2000 }; const request = http.request(options, (res) => { if (res.statusCode == 200) process.exit(0); else process.exit(1); }); request.on('error', () => process.exit(1)); request.end();"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
# Resource limits (more relaxed for dev)
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
# Networks
networks:
- dommate-dev-network
# Database Admin Tool (Optional for development)
adminer:
image: adminer:latest
container_name: dommate-adminer
restart: unless-stopped
ports:
- "8080:8080"
environment:
- ADMINER_DEFAULT_SERVER=sqlite
volumes:
- ./docker-data/dev/data:/app/data:ro
networks:
- dommate-dev-network
profiles:
- admin
# Log viewer (Optional)
dozzle:
image: amir20/dozzle:latest
container_name: dommate-logs
restart: unless-stopped
ports:
- "9999:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DOZZLE_LEVEL=info
- DOZZLE_TAILSIZE=300
networks:
- dommate-dev-network
profiles:
- logs
# Named volumes for development
volumes:
dev-data:
driver: local
driver_opts:
type: none
o: bind
device: ./docker-data/dev/data
# Development network
networks:
dommate-dev-network:
driver: bridge
name: dommate-dev