Skip to content

feat: add Docker health check and post-deploy verification #57

@nickmeinhold

Description

@nickmeinhold

Problem or Motivation

Current deploy verification only checks if the container status is "running" — it doesn't verify the app inside is actually healthy (bot connected to Telegram, MCP servers initialized, DB migrated). A container can be "running" but the app inside crashed and is in a restart loop.

Proposed Solution

  1. Health check endpoint — add a simple HTTP health server (e.g., on port 8080) that reports:

    • Bot connected to Telegram (polling active)
    • MCP manager initialized
    • DB accessible
    • Last successful message timestamp
  2. Docker HEALTHCHECK — add to Dockerfile:

    HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
      CMD curl -f http://localhost:8080/health || exit 1
  3. Deploy verification upgrade — check health endpoint instead of just container status

  4. Version endpoint — expose current version from package.json at /version for deployment tracking

Acceptance Criteria

  • HTTP health server runs alongside bot on configurable port
  • /health returns JSON with component status
  • /version returns current version and git SHA
  • Dockerfile includes HEALTHCHECK
  • Deploy workflow checks health endpoint
  • Health check doesn't interfere with bot operation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions