-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
167 lines (157 loc) · 3.88 KB
/
docker-compose.yml
File metadata and controls
167 lines (157 loc) · 3.88 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
version: '3.8'
services:
# Redis Cluster for caching and queues
redis:
image: redis:7-alpine
container_name: mev-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --maxmemory 2gb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mev-network
# Redis Cluster Node 2 (for scaling)
redis-node2:
image: redis:7-alpine
container_name: mev-redis-node2
ports:
- "6380:6379"
volumes:
- redis_data2:/data
command: redis-server --appendonly yes --maxmemory 2gb --maxmemory-policy allkeys-lru
networks:
- mev-network
# Prometheus for metrics
prometheus:
image: prom/prometheus:latest
container_name: mev-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- mev-network
# Grafana for dashboards
grafana:
image: grafana/grafana:latest
container_name: mev-grafana
ports:
- "3001:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- mev-network
# Mempool Monitor Service
mempool-monitor:
build:
context: .
dockerfile: Dockerfile
target: mempool-monitor
container_name: mev-mempool-monitor
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- REDIS_URL=redis://redis:6379
- ALCHEMY_WS_URL=${ALCHEMY_WS_URL}
depends_on:
redis:
condition: service_healthy
volumes:
- ./logs:/app/logs
networks:
- mev-network
restart: unless-stopped
# Arbitrage Engine Service
arbitrage-engine:
build:
context: .
dockerfile: Dockerfile
target: arbitrage-engine
container_name: mev-arbitrage-engine
ports:
- "3002:3002"
environment:
- NODE_ENV=production
- REDIS_URL=redis://redis:6379
- ALCHEMY_HTTP_URL=${ALCHEMY_HTTP_URL}
depends_on:
redis:
condition: service_healthy
volumes:
- ./logs:/app/logs
networks:
- mev-network
restart: unless-stopped
# MEV Execution Service
mev-execution:
build:
context: .
dockerfile: Dockerfile
target: mev-execution
container_name: mev-execution
ports:
- "3003:3003"
environment:
- NODE_ENV=production
- REDIS_URL=redis://redis:6379
- ALCHEMY_HTTP_URL=${ALCHEMY_HTTP_URL}
- FLASHBOTS_RELAY_URL=${FLASHBOTS_RELAY_URL}
depends_on:
redis:
condition: service_healthy
volumes:
- ./logs:/app/logs
networks:
- mev-network
restart: unless-stopped
# Monitoring Dashboard Service
monitoring:
build:
context: .
dockerfile: Dockerfile
target: monitoring
container_name: mev-monitoring
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- REDIS_URL=redis://redis:6379
depends_on:
redis:
condition: service_healthy
volumes:
- ./logs:/app/logs
networks:
- mev-network
restart: unless-stopped
volumes:
redis_data:
redis_data2:
prometheus_data:
grafana_data:
networks:
mev-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16