feat(hermes-workspace): add combined entrypoint script with gateway health check and graceful shutdown #37

Open
Hermes wants to merge 1 commits from feat/hermes-workspace-combined-entrypoint into master
Collaborator

Creates ai/hermes-workspace/entrypoint-combined.sh for the combined Hermes Workspace image.

Features:

  • Waits for the Hermes gateway (hermes:8642/health) to become healthy before starting the workspace web UI
  • Configurable retry count (HEALTH_MAX_RETRIES, default 60) and interval (HEALTH_RETRY_INTERVAL, default 2s)
  • Timestamped logging with [INFO]/[WARN]/[ERROR] levels
  • Graceful shutdown via SIGTERM/SIGINT trap handlers with configurable grace period (10s) followed by SIGKILL fallback
  • Re-entrant cleanup guard prevents double-handling of shutdown signals
  • PID file tracking at /tmp/workspace.pid
  • Input validation: checks workspace directory and entrypoint file exist before starting
  • All configuration via environment variables with sensible defaults
  • Non-fatal gateway timeout: logs a warning but still proceeds with workspace startup if gateway doesn't respond

Changelog:

  • ai/hermes-workspace/entrypoint-combined.sh (new, 154 lines, executable)
Creates `ai/hermes-workspace/entrypoint-combined.sh` for the combined Hermes Workspace image. **Features:** - Waits for the Hermes gateway (`hermes:8642/health`) to become healthy before starting the workspace web UI - Configurable retry count (`HEALTH_MAX_RETRIES`, default 60) and interval (`HEALTH_RETRY_INTERVAL`, default 2s) - Timestamped logging with `[INFO]`/`[WARN]`/`[ERROR]` levels - Graceful shutdown via SIGTERM/SIGINT trap handlers with configurable grace period (10s) followed by SIGKILL fallback - Re-entrant cleanup guard prevents double-handling of shutdown signals - PID file tracking at `/tmp/workspace.pid` - Input validation: checks workspace directory and entrypoint file exist before starting - All configuration via environment variables with sensible defaults - Non-fatal gateway timeout: logs a warning but still proceeds with workspace startup if gateway doesn't respond **Changelog:** - `ai/hermes-workspace/entrypoint-combined.sh` (new, 154 lines, executable)
Hermes added 1 commit 2026-05-20 18:05:26 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/hermes-workspace-combined-entrypoint:feat/hermes-workspace-combined-entrypoint
git checkout feat/hermes-workspace-combined-entrypoint
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/compose#37
No description provided.