docs: update Docker deployment docs for bridge networking migration#2963
docs: update Docker deployment docs for bridge networking migration#2963bitflicker64 wants to merge 3 commits intoapache:masterfrom
Conversation
- Create docker/README.md with full setup guide, env var reference, port table, health checks, and troubleshooting - Fix hugegraph-store/docs/deployment-guide.md: replace wrong env vars (GRPC_HOST, RAFT_ADDRESS etc.) with correct HG_* names - Update K8s manifest in deployment-guide.md to use HG_* env vars - Fix 7 files pointing to dead docker/example/ directory - Add Docker bridge network notes to PD configuration docs - Add distributed cluster section to server Docker README Relates to: apache#2952
The 3-node and single-node quickstart compose files currently mount entrypoint scripts from source as a workaround until updated Docker images are published with the new entrypoints baked in. Add a clear note explaining this temporary requirement so users are not confused about needing a full source clone to run the cluster. Relates to: apache#2952
There was a problem hiding this comment.
Pull request overview
This PR updates repository documentation to reflect a Docker deployment approach intended for bridge networking (Docker Desktop-friendly) and HG_* environment-variable based configuration, and consolidates Docker Compose references under the root docker/ directory.
Changes:
- Added a new root-level
docker/README.mdwith Docker Compose quickstart, 3-node cluster guidance, env-var reference tables, and troubleshooting. - Updated multiple component docs (PD/Store/Server + root README/AGENTS) to point to
docker/compose files and describe bridge-network deployment guidance. - Revised Store deployment guide examples/manifests to use
HG_*env var names instead of older variables.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
| hugegraph-store/docs/deployment-guide.md | Replaces outdated compose/K8s env var examples with HG_*-style docs and new compose references |
| hugegraph-store/README.md | Updates docker run example and compose references |
| hugegraph-store/AGENTS.md | Updates compose example paths to docker/ |
| hugegraph-server/hugegraph-dist/docker/README.md | Updates trace compose invocation and adds distributed cluster pointer to root docker/ |
| hugegraph-pd/docs/configuration.md | Adds bridge-network notes and HG_PD_GRPC_HOST guidance |
| hugegraph-pd/README.md | Adds bridge-network env-var examples and updates docker run snippet |
| hugegraph-pd/AGENTS.md | Updates bridge-network guidance and compose references |
| docker/README.md | New comprehensive Docker deployment guide and env-var reference |
| README.md | Updates top-level Docker links to root docker/ and adds Docker Desktop note |
| AGENTS.md | Updates compose example paths to docker/ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > [!WARNING] | ||
| > **Temporary workaround — source clone currently required.** The `docker-compose.yml` (quickstart) and `docker-compose-3pd-3store-3server.yml` compose files currently mount entrypoint scripts directly from the source tree because the published Docker Hub images do not yet include the updated entrypoints. This means these compose files currently require a full repository clone to run. This requirement will be removed in a follow-up image release once updated images are published to Docker Hub with the new entrypoints baked in. The `docker-compose-dev.yml` (dev build) is unaffected since it builds images from source. | ||
|
|
There was a problem hiding this comment.
The warning says the compose files mount updated entrypoint scripts from the source tree, but in the current repo the compose files mount config files under docker/configs/ (e.g. ./configs/application-pd0.yml:/hugegraph-pd/conf/application.yml) and don’t reference entrypoint script mounts. Please adjust this text (or update the compose files) so the workaround description matches what users actually need to mount.
| 1. Start Open-Telemetry-Collector | ||
|
|
||
| ```bash | ||
| cd hugegraph-server/hugegraph-dist/docker/example | ||
| docker-compose -f docker-compose-trace.yaml -p hugegraph-trace up -d | ||
| docker compose -f hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml -p hugegraph-trace up -d | ||
| ``` |
There was a problem hiding this comment.
These commands use a relative path (hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml) but no longer cd into the repo root or the example/ directory. Please add an explicit note that the command must be run from the repository root (or keep the cd step) to avoid copy/paste failures.
| 3. Stop Open-Telemetry-Collector | ||
|
|
||
| ```bash | ||
| cd hugegraph-server/hugegraph-dist/docker/example | ||
| docker-compose -f docker-compose-trace.yaml -p hugegraph-trace stop | ||
| docker compose -f hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml -p hugegraph-trace stop | ||
| ``` |
There was a problem hiding this comment.
Same issue as above: this assumes the current working directory makes hugegraph-server/hugegraph-dist/docker/example/docker-compose-trace.yaml resolvable. Please clarify the required working directory (or restore the prior cd instruction).
| ### Build Docker Image | ||
|
|
||
| From the project root: | ||
|
|
||
| ```bash | ||
| docker build -f hugegraph-store/Dockerfile -t hugegraph-store:latest . | ||
| ``` | ||
|
|
||
| ### Run Container | ||
|
|
||
| ```bash | ||
| docker run -d \ | ||
| -p 8520:8520 \ | ||
| -p 8500:8500 \ | ||
| -p 8510:8510 \ | ||
| -v /path/to/conf:/hugegraph-store/conf \ | ||
| -e HG_STORE_PD_ADDRESS=<pd-ip>:8686 \ | ||
| -e HG_STORE_GRPC_HOST=<your-ip> \ | ||
| -e HG_STORE_RAFT_ADDRESS=<your-ip>:8510 \ | ||
| -v /path/to/storage:/hugegraph-store/storage \ | ||
| -e PD_ADDRESS=192.168.1.10:8686,192.168.1.11:8686 \ | ||
| --name hugegraph-store \ | ||
| hugegraph-store:latest | ||
| hugegraph/store:latest | ||
| ``` |
There was a problem hiding this comment.
In this Docker section, the build step tags the image as hugegraph-store:latest, but the subsequent docker run command uses hugegraph/store:latest (a different image name). Please make the build/run instructions consistent (either run hugegraph-store:latest after building locally, or change the build tag to match the hugegraph/store naming).
| Build PD Docker image: | ||
|
|
||
| ```bash | ||
| # From project root | ||
| docker build -f hugegraph-pd/Dockerfile -t hugegraph-pd:latest . | ||
|
|
||
| # Run container | ||
| docker run -d \ | ||
| -p 8620:8620 \ | ||
| -p 8686:8686 \ | ||
| -p 8610:8610 \ | ||
| -v /path/to/conf:/hugegraph-pd/conf \ | ||
| -e HG_PD_GRPC_HOST=<your-ip> \ | ||
| -e HG_PD_RAFT_ADDRESS=<your-ip>:8610 \ | ||
| -e HG_PD_RAFT_PEERS_LIST=<your-ip>:8610 \ | ||
| -e HG_PD_INITIAL_STORE_LIST=<store-ip>:8500 \ | ||
| -v /path/to/data:/hugegraph-pd/pd_data \ | ||
| --name hugegraph-pd \ | ||
| hugegraph-pd:latest | ||
| hugegraph/pd:latest | ||
| ``` |
There was a problem hiding this comment.
The build command tags the image as hugegraph-pd:latest, but the docker run example uses hugegraph/pd:latest. Please align these so users who follow the build step can run the image they just built (or clearly separate "run pre-built image" vs "run locally built image").
| - name: HG_STORE_PD_ADDRESS | ||
| value: "hugegraph-pd-0.hugegraph-pd:8686,hugegraph-pd-1.hugegraph-pd:8686,hugegraph-pd-2.hugegraph-pd:8686" | ||
| - name: GRPC_HOST | ||
| - name: HG_STORE_GRPC_HOST | ||
| value: "$(POD_NAME).hugegraph-store" | ||
| - name: RAFT_ADDRESS | ||
| - name: HG_STORE_RAFT_ADDRESS |
There was a problem hiding this comment.
The Kubernetes manifest switches to HG_STORE_* env var names here, but the Store code/entrypoint in this repo doesn’t currently consume HG_STORE_ variables. If the runtime still expects the original env var names (or config file mounts), this change will break the manifest; please verify and update the manifest/docs to match the actually supported configuration mechanism.
| ## Environment Variable Reference | ||
|
|
||
| Configuration is injected via environment variables. The old `docker/configs/application-pd*.yml` and `docker/configs/application-store*.yml` files are no longer used. | ||
|
|
||
| ### PD Environment Variables |
There was a problem hiding this comment.
This section claims configuration is injected via HG_* env vars, but the current docker entrypoints in this repo (e.g. hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh, hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh, hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh) don’t read HG_* variables and just start the services. Please update the docs to match the current images/entrypoints, or include the corresponding entrypoint changes that implement HG_* injection.
| | Parameter | Type | Default | Description | | ||
| |-----------|------|---------|-------------| | ||
| | `grpc.host` | String | `127.0.0.1` | **IMPORTANT**: Must be set to actual IP address (not `127.0.0.1`) for distributed deployments. Store and Server nodes connect to this address. | | ||
| | `grpc.host` | String | `127.0.0.1` | **IMPORTANT**: Must be set to actual IP address (not `127.0.0.1`) for distributed deployments. Store and Server nodes connect to this address. In Docker bridge networking, set this to the container hostname (e.g., `pd0`) via `HG_PD_GRPC_HOST` env var. | |
There was a problem hiding this comment.
This mentions setting grpc.host via HG_PD_GRPC_HOST, but there’s no support for HG_PD_ env vars in the current PD code/entrypoint. Please either document the env var name Spring actually binds to (e.g. GRPC_HOST) or include the entrypoint logic that maps HG_PD_GRPC_HOST to the PD config.
| **Deprecated aliases** (still work but log a warning): | ||
|
|
||
| | Deprecated | Use Instead | | ||
| |------------|-------------| | ||
| | `GRPC_HOST` | `HG_PD_GRPC_HOST` | | ||
| | `RAFT_ADDRESS` | `HG_PD_RAFT_ADDRESS` | | ||
| | `RAFT_PEERS` | `HG_PD_RAFT_PEERS_LIST` | | ||
| | `PD_INITIAL_STORE_LIST` | `HG_PD_INITIAL_STORE_LIST` | | ||
|
|
There was a problem hiding this comment.
These tables claim the deprecated env var aliases “still work but log a warning”, but there’s no deprecation/alias handling in the current docker entrypoint scripts in this repo (they don’t parse env vars at all). Please remove the warning claim or update it to match the actual behavior implemented by the images.
| 2. Store nodes start after all PD nodes are healthy | ||
| 3. Server nodes start after all Store nodes are healthy | ||
|
|
||
| > **Note**: The deprecated env var names (`GRPC_HOST`, `RAFT_ADDRESS`, `RAFT_PEERS`, `PD_ADDRESS`, `BACKEND`, `PD_PEERS`) still work but log a warning. Use the `HG_*` prefixed names for new deployments. |
There was a problem hiding this comment.
This note says the deprecated env var names “still work but log a warning”. In the current repo, the docker entrypoints don’t implement alias migration/warnings, so this is likely inaccurate. Please either document the real compatibility behavior or drop the warning claim.
Purpose of the PR
Update all Docker deployment documentation to reflect the bridge networking migration from PR #2952. The old docs referenced a dead directory, used wrong environment variable names, and had no guidance for Docker Desktop users on Mac/Windows.
Main Changes
docker/README.md(new file) — comprehensive setup guide covering single-node and 3-node cluster, fullHG_*env var reference tables for PD/Store/Server, port reference, health verification commands, troubleshooting (OOM, Raft, partitions), and a note about the temporary entrypoint mount workaround until updated images are publishedhugegraph-store/docs/deployment-guide.md— replace Docker Compose section that used completely wrong env var names (GRPC_HOST,RAFT_ADDRESS,RAFT_PEERS,PD_ADDRESS,BACKEND,PD_PEERS) with correctHG_*names; also fix K8s manifest env var nameshugegraph-server/hugegraph-dist/docker/example/directory — update to point todocker/with correct file names (docker-compose.yml,docker-compose-dev.yml,docker-compose-3pd-3store-3server.yml)hugegraph-pd/docs/configuration.md,hugegraph-pd/README.md,hugegraph-pd/AGENTS.md— clarify thatgrpc.hostaccepts container hostnames in bridge mode viaHG_PD_GRPC_HOSThugegraph-server/hugegraph-dist/docker/README.mddocker runexamples inhugegraph-pd/README.mdandhugegraph-store/README.mdto use correctHG_*env var namesVerifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - Done