-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.antidote.yml
More file actions
180 lines (173 loc) · 4.37 KB
/
docker-compose.antidote.yml
File metadata and controls
180 lines (173 loc) · 4.37 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
version: '3.8'
services:
# AntidoteDB Node 1
antidote1:
image: antidotedb/antidote:latest
container_name: antidote-node-1
hostname: antidote1
ports:
- "8087:8087" # Client API
- "18087:8080" # HTTP API
environment:
- NODE_NAME=antidote@antidote1
- CLUSTER_NODES=antidote@antidote1,antidote@antidote2,antidote@antidote3
- RING_SIZE=64 # Optimized for performance
- LOGHASH=false
- TXLOG_HASH_SIZE=8
volumes:
- antidote1_data:/opt/antidote/data
- ./config/antidote.conf:/opt/antidote/releases/*/antidote.conf:ro
networks:
- antidote_cluster
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
deploy:
resources:
limits:
memory: 2G
cpus: '1.5'
reservations:
memory: 1G
cpus: '1.0'
# AntidoteDB Node 2
antidote2:
image: antidotedb/antidote:latest
container_name: antidote-node-2
hostname: antidote2
ports:
- "8088:8087" # Client API
- "18088:8080" # HTTP API
environment:
- NODE_NAME=antidote@antidote2
- CLUSTER_NODES=antidote@antidote1,antidote@antidote2,antidote@antidote3
- RING_SIZE=64
- LOGHASH=false
- TXLOG_HASH_SIZE=8
volumes:
- antidote2_data:/opt/antidote/data
- ./config/antidote.conf:/opt/antidote/releases/*/antidote.conf:ro
networks:
- antidote_cluster
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
depends_on:
- antidote1
deploy:
resources:
limits:
memory: 2G
cpus: '1.5'
reservations:
memory: 1G
cpus: '1.0'
# AntidoteDB Node 3
antidote3:
image: antidotedb/antidote:latest
container_name: antidote-node-3
hostname: antidote3
ports:
- "8089:8087" # Client API
- "18089:8080" # HTTP API
environment:
- NODE_NAME=antidote@antidote3
- CLUSTER_NODES=antidote@antidote1,antidote@antidote2,antidote@antidote3
- RING_SIZE=64
- LOGHASH=false
- TXLOG_HASH_SIZE=8
volumes:
- antidote3_data:/opt/antidote/data
- ./config/antidote.conf:/opt/antidote/releases/*/antidote.conf:ro
networks:
- antidote_cluster
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
depends_on:
- antidote1
- antidote2
deploy:
resources:
limits:
memory: 2G
cpus: '1.5'
reservations:
memory: 1G
cpus: '1.0'
# Performance monitoring for AntidoteDB
antidote-metrics:
image: prom/node-exporter:latest
container_name: antidote-metrics-exporter
ports:
- "9101:9100"
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
networks:
- antidote_cluster
restart: unless-stopped
# Load balancer for AntidoteDB cluster
antidote-haproxy:
image: haproxy:2.8-alpine
container_name: antidote-loadbalancer
ports:
- "8086:8087" # Load balanced client API
- "18086:8080" # HAProxy stats
volumes:
- ./config/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
- antidote_cluster
depends_on:
- antidote1
- antidote2
- antidote3
restart: unless-stopped
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "8087"]
interval: 30s
timeout: 5s
retries: 3
volumes:
antidote1_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/antidote1
antidote2_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/antidote2
antidote3_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/antidote3
networks:
antidote_cluster:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1