-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (123 loc) · 2.97 KB
/
docker-compose.yml
File metadata and controls
130 lines (123 loc) · 2.97 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
version: '3.8'
networks:
prkdb-net:
driver: bridge
services:
node1:
build:
context: .
args:
CACHEBUST: ${CACHEBUST:-1}
container_name: prkdb-node1
hostname: node1
networks:
- prkdb-net
ports:
- "50051:50051" # gRPC data service
- "9091:9091" # Prometheus metrics
volumes:
- node1-data:/data/prkdb
environment:
- NODE_ID=1
- GRPC_PORT=50051
- CLUSTER_NODES=1@node1:50051,2@node2:50052,3@node3:50053
- STORAGE_PATH=/data/prkdb
- NUM_PARTITIONS=9
- RUST_LOG=info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/metrics"]
interval: 5s
timeout: 3s
retries: 5
start_period: 15s
restart: unless-stopped
node2:
build:
context: .
args:
CACHEBUST: ${CACHEBUST:-1}
container_name: prkdb-node2
hostname: node2
networks:
- prkdb-net
ports:
- "50052:50052" # gRPC data service
- "9092:9092" # Prometheus metrics
volumes:
- node2-data:/data/prkdb
environment:
- NODE_ID=2
- GRPC_PORT=50052
- CLUSTER_NODES=1@node1:50051,2@node2:50052,3@node3:50053
- STORAGE_PATH=/data/prkdb
- NUM_PARTITIONS=9
- RUST_LOG=info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9092/metrics"]
interval: 5s
timeout: 3s
retries: 5
start_period: 15s
restart: unless-stopped
node3:
build:
context: .
args:
CACHEBUST: ${CACHEBUST:-1}
container_name: prkdb-node3
hostname: node3
networks:
- prkdb-net
ports:
- "50053:50053" # gRPC data service
- "9093:9093" # Prometheus metrics
volumes:
- node3-data:/data/prkdb
environment:
- NODE_ID=3
- GRPC_PORT=50053
- CLUSTER_NODES=1@node1:50051,2@node2:50052,3@node3:50053
- STORAGE_PATH=/data/prkdb
- NUM_PARTITIONS=9
- RUST_LOG=info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9093/metrics"]
interval: 5s
timeout: 3s
retries: 5
start_period: 15s
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
networks:
- prkdb-net
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
networks:
- prkdb-net
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
volumes:
node1-data:
node2-data:
node3-data:
prometheus-data:
grafana-data: