-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
188 lines (174 loc) · 4.16 KB
/
docker-compose.dev.yml
File metadata and controls
188 lines (174 loc) · 4.16 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
version: '3.8'
services:
# Development container with hot reloading
dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: qudag-dev
hostname: qudag-dev
stdin_open: true
tty: true
environment:
- RUST_LOG=debug,qudag=trace
- RUST_BACKTRACE=full
- CARGO_TERM_COLOR=always
- CARGO_TARGET_DIR=/tmp/target
volumes:
- .:/workspace:cached
- cargo-cache:/home/developer/.cargo
- target-cache:/tmp/target
ports:
- "4001:4001" # P2P
- "8080:8080" # RPC
- "9090:9090" # Metrics
- "3000:3000" # Debug server
networks:
- qudag-dev
command: |
bash -c "
cd /workspace
cargo watch -x 'run -- start --dev'
"
# Test node for integration testing
test-node:
build:
context: .
dockerfile: Dockerfile
container_name: qudag-test-node
hostname: qudag-test-node
environment:
- NODE_ID=test-node
- RUST_LOG=debug
- TEST_MODE=true
ports:
- "4002:4001"
- "8081:8080"
- "9091:9090"
volumes:
- test-data:/data
- test-config:/config
- test-keys:/keys
networks:
- qudag-dev
# Jaeger for distributed tracing
jaeger:
image: jaegertracing/all-in-one:latest
container_name: qudag-jaeger
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686" # Jaeger UI
- "14268:14268"
- "14250:14250"
- "9411:9411"
networks:
- qudag-dev
# Prometheus for metrics
prometheus:
image: prom/prometheus:latest
container_name: qudag-prometheus-dev
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
- '--log.level=debug'
ports:
- "9093:9090"
volumes:
- ./monitoring/prometheus-dev.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-dev-data:/prometheus
networks:
- qudag-dev
# Grafana with pre-configured dashboards
grafana:
image: grafana/grafana:latest
container_name: qudag-grafana-dev
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_LOG_LEVEL=debug
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel
ports:
- "3001:3000"
volumes:
- ./monitoring/grafana-dev:/etc/grafana/provisioning:ro
- grafana-dev-data:/var/lib/grafana
networks:
- qudag-dev
# Redis for development
redis:
image: redis:7-alpine
container_name: qudag-redis-dev
command: redis-server --loglevel debug
ports:
- "6379:6379"
volumes:
- redis-dev-data:/data
networks:
- qudag-dev
# PostgreSQL for development
postgres:
image: postgres:16-alpine
container_name: qudag-postgres-dev
environment:
- POSTGRES_DB=qudag_dev
- POSTGRES_USER=developer
- POSTGRES_PASSWORD=dev_password
- POSTGRES_INITDB_ARGS=--encoding=UTF-8
ports:
- "5432:5432"
volumes:
- postgres-dev-data:/var/lib/postgresql/data
- ./init-dev.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- qudag-dev
# Adminer for database management
adminer:
image: adminer:latest
container_name: qudag-adminer
ports:
- "8082:8080"
networks:
- qudag-dev
depends_on:
- postgres
# MailHog for email testing
mailhog:
image: mailhog/mailhog:latest
container_name: qudag-mailhog
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
networks:
- qudag-dev
# Documentation server
docs:
image: nginx:alpine
container_name: qudag-docs
ports:
- "8083:80"
volumes:
- ./docs:/usr/share/nginx/html:ro
networks:
- qudag-dev
networks:
qudag-dev:
driver: bridge
volumes:
# Development volumes
cargo-cache:
target-cache:
# Test volumes
test-data:
test-config:
test-keys:
# Service volumes
prometheus-dev-data:
grafana-dev-data:
redis-dev-data:
postgres-dev-data: