imbajin commented on code in PR #2963: URL: https://github.com/apache/hugegraph/pull/2963#discussion_r2972523136
########## hugegraph-pd/README.md: ########## @@ -203,22 +233,25 @@ Build PD Docker image: ```bash # From project root -docker build -f hugegraph-pd/Dockerfile -t hugegraph-pd:latest . +docker build -f hugegraph-pd/Dockerfile -t hugegraph-pd:1.7.0 . # 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:1.7.0 Review Comment: The build and run examples are using two different image names (`hugegraph-pd:1.7.0` vs `hugegraph/pd:1.7.0`). As written, a local `docker build` cannot be run by the next command without an extra `docker tag` step. Please make the tag consistent with the runtime image name used by the Docker Compose files, for example: ```suggestion docker build -f hugegraph-pd/Dockerfile -t hugegraph/pd:1.7.0 . ``` ########## docker/README.md: ########## @@ -0,0 +1,265 @@ +# 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: This quick-start command still resolves to `latest` unless the user exports `HUGEGRAPH_VERSION`, but the bullets above claim the compose file is using `1.7.0` images. That mismatch makes the example non-reproducible as written. If the intent is to run the release tag, please set the version in the command: ```suggestion HUGEGRAPH_VERSION=1.7.0 docker compose up -d ``` -- 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]
