Copilot commented on code in PR #2963:
URL: https://github.com/apache/hugegraph/pull/2963#discussion_r2971336273


##########
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
+```
+
+- Images: `hugegraph/pd:latest`, `hugegraph/store:latest`, 
`hugegraph/server:latest`
+- `pull_policy: always` — always pulls the latest image
+- PD healthcheck endpoint: `/v1/health`
+- Single PD, single Store (`HG_PD_INITIAL_STORE_LIST: store:8500`), single 
Server
+- Server healthcheck endpoint: `/versions`
+

Review Comment:
   In “Option A: Quick Start (pre-built images)”, the docs imply the compose 
file works purely from Docker Hub images, but `docker/docker-compose.yml` 
currently relies on volume-mounting the new `docker-entrypoint.sh` scripts from 
the repository (see the `../hugegraph-*/.../docker-entrypoint.sh` mounts). 
Please document this temporary workaround and that users must run compose from 
a checked-out repo until the images ship the updated entrypoints (or update the 
compose/docs to not require host mounts).



-- 
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]

Reply via email to