Skip to content

Commit 97b197d

Browse files
committed
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.
1 parent 39dfb2d commit 97b197d

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

hugegraph-pd/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ bin/stop-hugegraph-pd.sh
7878
#### Startup Options
7979

8080
```bash
81-
bin/start-hugegraph-pd.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-y ENABLE_OTEL]
81+
bin/start-hugegraph-pd.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-y ENABLE_OTEL] [-d DAEMON]
8282
```
8383

8484
- `-g`: GC type (`g1` or `ZGC`, default: `g1`)
8585
- `-j`: Custom JVM options (e.g., `-j "-Xmx4g -Xms4g"`)
8686
- `-y`: Enable OpenTelemetry tracing (`true` or `false`, default: `false`)
87+
- `-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.
8788

8889
### Configuration
8990

hugegraph-server/hugegraph-dist/docker/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,20 @@ HUGEGRAPH_VERSION=1.7.0 docker compose -f docker-compose-3pd-3store-3server.yml
130130

131131
See [docker/README.md](../../../docker/README.md) for the full setup guide,
132132
environment variable reference, and troubleshooting.
133+
134+
## 6. Process Supervision & Health Checks
135+
136+
All four HugeGraph Docker images (PD, Store, Server, Server-hstore) include
137+
native `HEALTHCHECK` instructions. `docker ps` shows real health status:
138+
139+
| Image | Health endpoint |
140+
|---|---|
141+
| `hugegraph/hugegraph` | `GET /versions` on port 8080 |
142+
| `hugegraph/hugegraph-hstore` | `GET /versions` on port 8080 |
143+
| `hugegraph/hugegraph-pd` | `GET /v1/health` on port 8620 |
144+
| `hugegraph/hugegraph-store` | `GET /v1/health` on port 8520 |
145+
146+
The entrypoints supervise the Java process directly — when Java exits, the
147+
container exits and Docker's `restart: unless-stopped` policy brings it back
148+
automatically. The old cron-based monitor (`-m true`) is for VM/bare-metal
149+
deployments only and is not used in Docker images.

hugegraph-store/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,12 @@ bin/restart-hugegraph-store.sh
231231
#### Startup Options
232232

233233
```bash
234-
bin/start-hugegraph-store.sh [-g GC_TYPE] [-j "JVM_OPTIONS"]
234+
bin/start-hugegraph-store.sh [-g GC_TYPE] [-j "JVM_OPTIONS"] [-d DAEMON]
235235
```
236236

237237
- `-g`: GC type (`g1` or `ZGC`, default: `g1`)
238238
- `-j`: Custom JVM options (e.g., `-j "-Xmx16g -Xms8g"`)
239+
- `-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.
239240

240241
Default JVM memory settings (defined in `start-hugegraph-store.sh`):
241242
- Max heap: 32GB

0 commit comments

Comments
 (0)