-
Notifications
You must be signed in to change notification settings - Fork 629
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
136 lines (129 loc) · 4.01 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
136 lines (129 loc) · 4.01 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
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: hugegraph-single
networks:
hg-net:
driver: bridge
volumes:
hg-pd-data:
hg-store-data:
services:
pd:
build:
context: ..
dockerfile: hugegraph-pd/Dockerfile
container_name: hg-pd
hostname: pd
restart: unless-stopped
networks: [hg-net]
environment:
HG_PD_GRPC_HOST: pd
HG_PD_GRPC_PORT: "8686"
HG_PD_REST_PORT: "8620"
HG_PD_RAFT_ADDRESS: pd:8610
HG_PD_RAFT_PEERS_LIST: pd:8610
HG_PD_INITIAL_STORE_LIST: store:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
ports:
- "8620:8620"
volumes:
- hg-pd-data:/hugegraph-pd/pd_data
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8620/v1/health >/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
store:
build:
context: ..
dockerfile: hugegraph-store/Dockerfile
container_name: hg-store
hostname: store
restart: unless-stopped
networks: [hg-net]
depends_on:
pd:
condition: service_healthy
environment:
HG_STORE_PD_ADDRESS: pd:8686
HG_STORE_GRPC_HOST: store
HG_STORE_GRPC_PORT: "8500"
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
ports:
- "8520:8520"
volumes:
- hg-store-data:/hugegraph-store/storage
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8520/v1/health >/dev/null || exit 1"]
interval: 10s
timeout: 10s
retries: 30
start_period: 30s
server:
image: ${HUGEGRAPH_SERVER_IMAGE:-hugegraph/server:dev}
pull_policy: ${HUGEGRAPH_SERVER_PULL_POLICY:-build}
build:
context: ..
dockerfile: hugegraph-server/Dockerfile-hstore
container_name: hg-server
hostname: server
restart: unless-stopped
networks: [hg-net]
depends_on:
store:
condition: service_healthy
environment:
HG_SERVER_BACKEND: hstore
HG_SERVER_PD_PEERS: pd:8686
HG_SERVER_CLUSTER: hg
HG_SERVER_USE_PD: "true"
HG_SERVER_REST_URL: http://server:8080
HG_SERVER_MIN_FREE_MEMORY: "0"
HG_SERVER_INIT_STORE_ENABLED: "false"
HG_SERVER_AUTH_TOKEN_SECRET: ${HUGEGRAPH_AUTH_TOKEN_SECRET:-}
PASSWORD: ${HUGEGRAPH_ADMIN_PASSWORD:?Set a non-default admin password}
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://server:8080/versions >/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s
hubble:
image: ${HUBBLE_IMAGE:-hugegraph/hubble:latest}
pull_policy: ${HUBBLE_PULL_POLICY:-missing}
container_name: hg-hubble
hostname: hubble
restart: unless-stopped
networks: [hg-net]
depends_on:
server:
condition: service_healthy
ports:
- "${HUBBLE_PUBLISH_HOST:-127.0.0.1}:8088:8088"
volumes:
- ./hugegraph-hubble.properties:/hubble/conf/hugegraph-hubble.properties:ro
healthcheck:
test: ["CMD-SHELL", "body=$$(curl -fsS http://127.0.0.1:8088/about) && printf '%s' \"$$body\" | grep -q '\"status\":200' && printf '%s' \"$$body\" | grep -q '\"name\":\"hugegraph-hubble\"'"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s