Copilot commented on code in PR #2963:
URL: https://github.com/apache/hugegraph/pull/2963#discussion_r2970134632
##########
hugegraph-store/README.md:
##########
@@ -358,11 +358,12 @@ 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
Review Comment:
The Docker build/run example uses inconsistent image tags: the preceding
build command tags `hugegraph-store:latest`, but this `docker run` uses
`hugegraph/store:latest`. Please make the tags consistent so users run the
image they just built (or clearly indicate when to use the Docker Hub image
instead).
```suggestion
hugegraph-store:latest
```
##########
docker/README.md:
##########
@@ -0,0 +1,263 @@
+# HugeGraph Docker Deployment
+
+This directory contains Docker Compose files for running HugeGraph:
+
+| File | Description |
+|------|-------------|
+| `docker-compose.yml` | Single-node cluster using pre-built images from
Docker Hub |
+| `docker-compose.dev.yml` | Single-node cluster built from source (for
developers) |
+| `docker-compose-3pd-3store-3server.yml` | 3-node distributed cluster (PD +
Store + Server) |
+
+## Prerequisites
+
+- **Docker Engine** 20.10+ (or Docker Desktop 4.x+)
+- **Docker Compose** v2 (included in Docker Desktop)
+- **Memory**: Allocate at least **12 GB** to Docker Desktop (Settings →
Resources → Memory). The 3-node cluster runs 9 JVM processes (3 PD + 3 Store +
3 Server) which are memory-intensive. Insufficient memory causes OOM kills that
appear as silent Raft failures.
+
+> [!IMPORTANT]
+> The 12 GB minimum is for Docker Desktop (Mac/Windows). On Linux with native
Docker, ensure the host has at least 12 GB of free memory.
+
+## Why Bridge Networking (Not Host Mode)
+
+Previous versions used `network_mode: host`, which only works on Linux and is
incompatible with Docker Desktop on Mac/Windows. The cluster now uses a proper
Docker bridge network (`hg-net`) where services communicate via container
hostnames (`pd0`, `pd1`, `store0`, etc.) instead of `127.0.0.1`. This makes the
cluster portable across all platforms.
+
+---
+
+## Single-Node Setup
+
+Two compose files are available for running a single-node cluster (1 PD + 1
Store + 1 Server):
+
+### Option A: Quick Start (pre-built images)
+
+Uses pre-built images from Docker Hub. Best for **end users** who want to run
HugeGraph quickly.
+
+```bash
+cd docker
+docker compose up -d
+```
+
Review Comment:
The quickstart instructions don’t mention that the repo’s compose files
currently mount `docker-entrypoint.sh` scripts from the source tree as a
temporary workaround (see the TODO in `docker-compose.yml`). Without calling
this out, users may assume the Docker Hub images alone are sufficient to
support the `HG_*` env var injection. Please add an explicit IMPORTANT note
describing the temporary entrypoint-mount requirement and when it can be
removed once images are updated.
##########
hugegraph-pd/README.md:
##########
@@ -210,15 +240,18 @@ 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
```
Review Comment:
This `docker run` example assumes the image supports `HG_PD_*` env var
injection via the new entrypoint. However the repo’s compose files still mount
`hg-pd-dist/docker/docker-entrypoint.sh` as a temporary workaround until images
are published with the updated entrypoint. Please add a note here clarifying
the required image version or the workaround, otherwise this command may fail
for users pulling older images.
```suggestion
> **Note:** This `docker run` example assumes the PD image already includes
the new entrypoint that supports `HG_PD_*` environment variables. If you are
using an older published image, either build the image locally as shown above
or follow the Docker Compose examples (which mount
`hg-pd-dist/docker/docker-entrypoint.sh` as the entrypoint) to enable these
environment variables.
```
##########
hugegraph-store/README.md:
##########
@@ -358,11 +358,12 @@ 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
Review Comment:
This `docker run` example relies on the image understanding `HG_STORE_*` env
vars via the updated entrypoint. But the repo’s compose files still mount
`hg-store-dist/docker/docker-entrypoint.sh` as a temporary workaround until
updated images are published. Please add a note here clarifying the required
image version or the workaround to avoid user confusion when running older
images.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]