Skip to content

docs: document -d flag and Docker process supervision model #3056

Merged
imbajin merged 2 commits into
apache:masterfrom
bitflicker64:docs/docker-supervision-flags
Jun 9, 2026
Merged

docs: document -d flag and Docker process supervision model #3056
imbajin merged 2 commits into
apache:masterfrom
bitflicker64:docs/docker-supervision-flags

Conversation

@bitflicker64

Copy link
Copy Markdown
Contributor

Purpose of the PR

Documents the new -d true|false daemon flag and the Docker-native process supervision model introduced in the preceding PRs.

Main Changes

hugegraph-pd/README.md:

  • Add -d DAEMON to the startup options signature
  • Document: daemon mode (true = daemon, false = foreground; default: true); set to false under Docker or a process supervisor

hugegraph-store/README.md:

  • Same additions as PD

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

  • Add section explaining HEALTHCHECK endpoints (:8080/versions, :8620/v1/health, :8520/v1/health) and the Java process supervision model
  • Note that the cron-based monitor (-m true) is for VM/bare-metal only, not Docker

Verifying these changes

  • Need tests and can be verified as follows:
    • docker inspect <image> | grep -A5 Healthcheck — confirms HEALTHCHECK is present
    • docker stop <container> — container exits cleanly (SIGTERM forwarded to Java)
    • kill -9 <java-pid> inside container — container exits, restart policy fires

Does this PR potentially affect the following parts?

  • Dependencies
  • Modify configurations
  • The public API
  • Other affects
  • Nope

Documentation Status

  • Doc - Updated (in-repo README files only; hugegraph-doc follow-up is tracked separately)

- 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 apache#3043.
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 9, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 1.48%. Comparing base (39dfb2d) to head (97b197d).

❗ There is a different number of reports uploaded between BASE (39dfb2d) and HEAD (97b197d). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (39dfb2d) HEAD (97b197d)
2 1
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #3056       +/-   ##
============================================
- Coverage     34.89%   1.48%   -33.42%     
+ Complexity      338      21      -317     
============================================
  Files           803     781       -22     
  Lines         68241   65726     -2515     
  Branches       8965    8517      -448     
============================================
- Hits          23815     975    -22840     
- Misses        41826   64667    +22841     
+ Partials       2600      84     -2516     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: no. Summary: The Docker supervision docs overstate restart behavior for direct docker run users. Evidence: static review of hugegraph-server/hugegraph-dist/docker/README.md and the compose files.

Latest-head CI has a visible failure; please also check codecov/project: 🔗 https://app.codecov.io/gh/apache/hugegraph/pull/3056

Comment thread hugegraph-server/hugegraph-dist/docker/README.md Outdated
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 apache#3056.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, the doc update matches the current Docker supervision behavior.

One non-blocking follow-up: since the README also has direct docker run examples, it may be helpful to add a small --restart unless-stopped example or note there as well. The new section already scopes restart behavior correctly, but an inline example would make it harder for users to miss.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 9, 2026
@imbajin imbajin merged commit ef5d4e0 into apache:master Jun 9, 2026
15 checks passed
@bitflicker64

Copy link
Copy Markdown
Contributor Author

+1, the doc update matches the current Docker supervision behavior.

One non-blocking follow-up: since the README also has direct docker run examples, it may be helpful to add a small --restart unless-stopped example or note there as well. The new section already scopes restart behavior correctly, but an inline example would make it harder for users to miss.

ill make a follow up pr later with the chore fixes 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants