Container Runtime Contract

This page owns the runtime contract for the deployable modules.

Shared Rules

  • every long-running module runs in Docker
  • every module runs as a non-root numeric user via HOST_UID and HOST_GID
  • container paths are /app/data, /app/logs, and /app/conf
  • /app/conf stays mounted read-only
  • local runtime uses .env.local
  • remote deploy uses .env.server

ab-ticket-bot-jobs

Responsibilities:

  • poll WhatsApp messages from WhatsApp Adapter
  • deduplicate processed events
  • resolve or create Jira issues
  • append ticket descriptions
  • persist runtime state in CSV files

Runtime contract:

  • entrypoint: python -m ab_ticket_bot_jobs
  • restart policy: unless-stopped
  • logs: /app/logs/ab-ticket-bot-jobs.log
  • persisted data: /app/data
  • no HTTP endpoint

Required env:

  • AUTO_SHIFT_LOCK_WHATSAPP_ADAPTER_BASE_URL
  • AUTO_SHIFT_LOCK_WHATSAPP_ADAPTER_API_TOKEN
  • AUTO_SHIFT_LOCK_WHATSAPP_ADAPTER_SESSION
  • AUTO_SHIFT_LOCK_NOTIFY_CONVERSATION_ID
  • JIRA_EMAIL
  • JIRA_API_TOKEN

ab-ticket-bot-docs

Responsibilities:

  • package root MkDocs documentation
  • serve the generated static site
  • expose a health endpoint for local or private runtime checks

Runtime contract:

  • entrypoint: python /app/serve_docs.py
  • restart policy: unless-stopped
  • logs: /app/logs/ab-ticket-bot-docs.log
  • health endpoint: GET /healthz
  • default bind: 127.0.0.1:18081

Ownership Checks

Before local start or remote deploy:

  • data/ must be writable by HOST_UID:HOST_GID
  • logs/ must be writable by HOST_UID:HOST_GID
  • module scripts fail fast on ownership mismatch to avoid partial starts