forked from primihub/primihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
122 lines (116 loc) · 3.37 KB
/
docker-compose.yml
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
version: '3'
services:
node0:
image: ${REGISTRY:-docker.io}/primihub/primihub-node:${TAG:-latest}
restart: "always"
container_name: primihub-node0
# ports:
# - "50050:50050"
volumes:
# - ./config:/app/config
- ./data:/app/data
entrypoint:
- "/bin/bash"
- "-c"
- "GLOG_logtostderr=1 GLOG_v=2 ./primihub-node --node_id=node0 --config=/app/config/primihub_node0.yaml"
# GLOG_v 0->7,the larger the value the more detailed the log
depends_on:
meta0:
condition: service_healthy
node1:
image: ${REGISTRY:-docker.io}/primihub/primihub-node:${TAG:-latest}
restart: "always"
container_name: primihub-node1
# ports:
# - "50051:50051"
volumes:
# - ./config:/app/config
- ./data:/app/data
entrypoint:
- "/bin/bash"
- "-c"
- "GLOG_logtostderr=1 GLOG_v=2 ./primihub-node --node_id=node1 --config=/app/config/primihub_node1.yaml"
depends_on:
meta1:
condition: service_healthy
node2:
image: ${REGISTRY:-docker.io}/primihub/primihub-node:${TAG:-latest}
restart: "always"
container_name: primihub-node2
# ports:
# - "50052:50052"
volumes:
# - ./config:/app/config
- ./data:/app/data
entrypoint:
- "/bin/bash"
- "-c"
- "GLOG_logtostderr=1 GLOG_v=2 ./primihub-node --node_id=node2 --config=/app/config/primihub_node2.yaml"
depends_on:
meta2:
condition: service_healthy
meta0:
image: ${REGISTRY:-docker.io}/primihub/primihub-meta:${TAG:-latest}
restart: "always"
container_name: primihub-meta0
# ports:
# - "7977:9099"
# volumes:
# - ./data:/data
entrypoint:
- "/bin/bash"
- "-c"
- "java -jar /applications/meta-simple.jar \
--server.port=8088 \
--grpc.server.port=9099 \
--db.path=/data/meta_service/node0 \
--collaborate=http://primihub-meta1:8088/,http://primihub-meta2:8088/"
healthcheck:
test: ["CMD-SHELL", "wget -O - -q http://localhost:8088/health"]
interval: 8s
timeout: 3s
retries: 3
meta1:
image: ${REGISTRY:-docker.io}/primihub/primihub-meta:${TAG:-latest}
restart: "always"
container_name: primihub-meta1
# ports:
# - "7977:9099"
# volumes:
# - ./data:/data
entrypoint:
- "/bin/bash"
- "-c"
- "java -jar /applications/meta-simple.jar \
--server.port=8088 \
--grpc.server.port=9099 \
--db.path=/data/meta_service/node1 \
--collaborate=http://primihub-meta0:8088/,http://primihub-meta2:8088/"
healthcheck:
test: ["CMD-SHELL", "wget -O - -q http://localhost:8088/health"]
interval: 8s
timeout: 3s
retries: 3
meta2:
image: ${REGISTRY:-docker.io}/primihub/primihub-meta:${TAG:-latest}
restart: "always"
container_name: primihub-meta2
# ports:
# - "7977:9099"
# volumes:
# - ./data:/data
entrypoint:
- "/bin/bash"
- "-c"
- "java -jar /applications/meta-simple.jar \
--server.port=8088 \
--grpc.server.port=9099 \
--db.path=/data/meta_service/node2 \
--collaborate=http://primihub-meta0:8088/,http://primihub-meta1:8088/"
healthcheck:
test: ["CMD-SHELL", "wget -O - -q http://localhost:8088/health"]
interval: 8s
timeout: 3s
retries: 3
networks:
primihub_net: