| # |
| # 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-hstore |
| |
| networks: |
| hg-net: |
| |
| volumes: |
| pd-data: |
| store-data: |
| hubble-data: |
| |
| services: |
| pd: |
| image: hugegraph/pd:${HUGEGRAPH_VERSION:-latest} |
| pull_policy: ${HUGEGRAPH_PULL_POLICY:-missing} |
| 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 |
| HG_PD_AUTH_SECRET_KEY: ${HG_PD_AUTH_SECRET_KEY:?set HG_PD_AUTH_SECRET_KEY in .env; see docker/README.md} |
| ports: |
| - "8620:8620" |
| volumes: |
| - pd-data:/hugegraph-pd/pd_data |
| healthcheck: |
| test: ["CMD-SHELL", "curl -fsS http://localhost:8620/v1/health >/dev/null"] |
| interval: 10s |
| timeout: 5s |
| retries: 12 |
| start_period: 30s |
| |
| store: |
| image: hugegraph/store:${HUGEGRAPH_VERSION:-latest} |
| pull_policy: ${HUGEGRAPH_PULL_POLICY:-missing} |
| 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: |
| - store-data:/hugegraph-store/storage |
| healthcheck: |
| test: ["CMD-SHELL", "curl -fsS http://localhost:8520/v1/health >/dev/null"] |
| interval: 10s |
| timeout: 10s |
| retries: 30 |
| start_period: 60s |
| |
| server: |
| image: hugegraph/server:${HUGEGRAPH_VERSION:-latest} |
| pull_policy: ${HUGEGRAPH_PULL_POLICY:-missing} |
| 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" |
| # Unset-only default: ":-" would turn an empty host value into 120 |
| # silently, which the entrypoint rejects on purpose. |
| HG_SERVER_STARTUP_TIMEOUT_S: ${HG_SERVER_STARTUP_TIMEOUT_S-120} |
| HG_SERVER_AUTH_TOKEN_SECRET: ${HUGEGRAPH_AUTH_TOKEN_SECRET:-} |
| PASSWORD: ${HUGEGRAPH_ADMIN_PASSWORD:-} |
| # bin/wait-storage.sh polls the PD REST API, so it needs the same secret |
| PD_AUTH_PASSWORD: ${HG_PD_AUTH_SECRET_KEY:?set HG_PD_AUTH_SECRET_KEY in .env; see docker/README.md} |
| ports: |
| - "8080:8080" |
| healthcheck: |
| test: ["CMD-SHELL", "curl -fsS http://server:8080/versions >/dev/null"] |
| interval: 10s |
| timeout: 5s |
| retries: 30 |
| start_period: 60s |
| |
| hubble: |
| image: ${HUBBLE_IMAGE:-hugegraph/hubble:latest} |
| pull_policy: ${HUBBLE_PULL_POLICY:-missing} |
| restart: unless-stopped |
| networks: [hg-net] |
| depends_on: |
| server: |
| condition: service_healthy |
| environment: |
| SPRING_DATASOURCE_URL: jdbc:h2:file:/hubble/data/hubble;DB_CLOSE_ON_EXIT=FALSE |
| ports: |
| - "${HUBBLE_PUBLISH_HOST:-127.0.0.1}:8088:8088" |
| volumes: |
| - hubble-data:/hubble/data |
| - type: bind |
| source: ./conf/hubble/hstore.local.properties |
| target: /hubble/conf/hugegraph-hubble.properties |
| read_only: true |
| bind: |
| # The file is generated by set-hubble-pd-password.sh and is |
| # gitignored. Without this, Docker would create an empty |
| # directory at that path and Hubble would boot unconfigured. |
| create_host_path: false |
| healthcheck: |
| test: |
| - CMD-SHELL |
| - >- |
| body=$$(curl -fsS http://localhost: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 |