From 97b197db468a7db43076c09d7828225ab71c3e4e Mon Sep 17 00:00:00 2001 From: Himanshu Verma Date: Tue, 9 Jun 2026 11:13:17 +0530 Subject: [PATCH 1/2] docs: document -d flag and Docker process supervision model - Add -d true|false option to PD and Store startup options sections (default: true = daemon; false = foreground for Docker/supervisors) - Add section to docker/README.md explaining HEALTHCHECK endpoints and the Java process supervision model (replaces old cron monitor) Chunk 10 of #3043. --- hugegraph-pd/README.md | 3 ++- .../hugegraph-dist/docker/README.md | 17 +++++++++++++++++ hugegraph-store/README.md | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/hugegraph-pd/README.md b/hugegraph-pd/README.md index b900673ace..794dba9b98 100644 --- a/hugegraph-pd/README.md +++ b/hugegraph-pd/README.md @@ -78,12 +78,13 @@ bin/stop-hugegraph-pd.sh #### Startup Options ```bash -bin/start-hugegraph-pd.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-y ENABLE_OTEL] +bin/start-hugegraph-pd.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-y ENABLE_OTEL] [-d DAEMON] ``` - `-g`: GC type (`g1` or `ZGC`, default: `g1`) - `-j`: Custom JVM options (e.g., `-j "-Xmx4g -Xms4g"`) - `-y`: Enable OpenTelemetry tracing (`true` or `false`, default: `false`) +- `-d`: Daemon mode (`true` = daemon, `false` = foreground; default: `true`). Set to `false` when running under Docker or a process supervisor so the container exits if Java dies. ### Configuration diff --git a/hugegraph-server/hugegraph-dist/docker/README.md b/hugegraph-server/hugegraph-dist/docker/README.md index 7ee88ab1fe..6e8b2c0c30 100644 --- a/hugegraph-server/hugegraph-dist/docker/README.md +++ b/hugegraph-server/hugegraph-dist/docker/README.md @@ -130,3 +130,20 @@ HUGEGRAPH_VERSION=1.7.0 docker compose -f docker-compose-3pd-3store-3server.yml See [docker/README.md](../../../docker/README.md) for the full setup guide, environment variable reference, and troubleshooting. + +## 6. Process Supervision & Health Checks + +All four HugeGraph Docker images (PD, Store, Server, Server-hstore) include +native `HEALTHCHECK` instructions. `docker ps` shows real health status: + +| Image | Health endpoint | +|---|---| +| `hugegraph/hugegraph` | `GET /versions` on port 8080 | +| `hugegraph/hugegraph-hstore` | `GET /versions` on port 8080 | +| `hugegraph/hugegraph-pd` | `GET /v1/health` on port 8620 | +| `hugegraph/hugegraph-store` | `GET /v1/health` on port 8520 | + +The entrypoints supervise the Java process directly — when Java exits, the +container exits and Docker's `restart: unless-stopped` policy brings it back +automatically. The old cron-based monitor (`-m true`) is for VM/bare-metal +deployments only and is not used in Docker images. diff --git a/hugegraph-store/README.md b/hugegraph-store/README.md index 223517525e..4e6bc8aca2 100644 --- a/hugegraph-store/README.md +++ b/hugegraph-store/README.md @@ -231,11 +231,12 @@ bin/restart-hugegraph-store.sh #### Startup Options ```bash -bin/start-hugegraph-store.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] +bin/start-hugegraph-store.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-d DAEMON] ``` - `-g`: GC type (`g1` or `ZGC`, default: `g1`) - `-j`: Custom JVM options (e.g., `-j "-Xmx16g -Xms8g"`) +- `-d`: Daemon mode (`true` = daemon, `false` = foreground; default: `true`). Set to `false` when running under Docker or a process supervisor so the container exits if Java dies. Default JVM memory settings (defined in `start-hugegraph-store.sh`): - Max heap: 32GB From 532f8cd70f7200c6e71bf17487849df419f32225 Mon Sep 17 00:00:00 2001 From: Himanshu Verma Date: Tue, 9 Jun 2026 15:03:46 +0530 Subject: [PATCH 2/2] docs(docker): qualify restart-policy behavior for non-compose users Clarify that automatic container restart requires a restart policy (e.g. restart: unless-stopped in the provided compose files). Direct docker run users need to pass --restart unless-stopped explicitly. Addresses review feedback on #3056. --- hugegraph-server/hugegraph-dist/docker/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hugegraph-server/hugegraph-dist/docker/README.md b/hugegraph-server/hugegraph-dist/docker/README.md index 6e8b2c0c30..9214aa830e 100644 --- a/hugegraph-server/hugegraph-dist/docker/README.md +++ b/hugegraph-server/hugegraph-dist/docker/README.md @@ -143,7 +143,4 @@ native `HEALTHCHECK` instructions. `docker ps` shows real health status: | `hugegraph/hugegraph-pd` | `GET /v1/health` on port 8620 | | `hugegraph/hugegraph-store` | `GET /v1/health` on port 8520 | -The entrypoints supervise the Java process directly — when Java exits, the -container exits and Docker's `restart: unless-stopped` policy brings it back -automatically. The old cron-based monitor (`-m true`) is for VM/bare-metal -deployments only and is not used in Docker images. +The entrypoints supervise the Java process directly — when Java exits, the container exits. If started with a restart policy (the provided compose files use `restart: unless-stopped`), Docker will bring it back automatically. The old cron-based monitor (`-m true`) is for VM/bare-metal deployments only and is not used in Docker images.