Skip to content

[deploy] Docker Compose: charon + prometheus + grafana stack for Hetzner CX22 #22

@obchain

Description

@obchain

Context

One command (docker compose up -d) should bring up the whole stack on a fresh VPS. Target host is a €3.79/mo Hetzner CX22 (2 vCPU, 4 GB RAM, 40 GB SSD) — tight, but enough for one-chain v0.1.

Scope

  • Multi-stage Dockerfile for charon (builder + slim runtime image)
  • docker-compose.yml with three services: charon, prometheus, grafana
  • Prometheus config scraping charon:9090
  • Grafana with a pre-provisioned dashboard (liquidations, profit, scan latency, chain health gauges)
  • Volumes for Prometheus/Grafana persistence
  • .env-driven secrets (mounted into the charon container)
  • Runbook in deploy/README.md: provision VPS, clone repo, docker compose up -d

Acceptance criteria

  • docker compose up -d on a fresh Ubuntu 22.04 box brings all three services up
  • Grafana reachable at :3000 with the default dashboard populated
  • Charon container restarts on crash (restart policy)
  • Built image < 200 MB (scratch or distroless base)
  • Runbook is copy-paste-able end-to-end for a beginner

References

  • PRD section 7b (Docker Deployment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions