44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
# Prometheus stack for HiveGrid.
|
|
#
|
|
# Deploy as a Coolify "Docker Compose" service or with vanilla
|
|
# `docker compose up -d` on the Hetzner observability box. The bind mount
|
|
# expects the prometheus.yml + secrets file to live alongside this file.
|
|
#
|
|
# Required files alongside this compose:
|
|
# * prometheus.yml — committed
|
|
# * secrets/metrics_token — NOT committed; operator provisions
|
|
#
|
|
# Storage: a named volume keeps tsdb data so a `compose down && up` won't
|
|
# wipe history. Retention is set to 30d which is plenty for an 8-week
|
|
# staging cycle on 32 GB RAM.
|
|
|
|
services:
|
|
prometheus:
|
|
image: prom/prometheus:v3.6.0@sha256:76947e7ef22f8a698fc638f706685909be425dbe09bd7a2cd7aca849f79b5f64
|
|
container_name: hivegrid-prometheus
|
|
restart: unless-stopped
|
|
user: "65534:65534"
|
|
command:
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
- --storage.tsdb.path=/prometheus
|
|
- --storage.tsdb.retention.time=30d
|
|
- --web.console.libraries=/usr/share/prometheus/console_libraries
|
|
- --web.console.templates=/usr/share/prometheus/consoles
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- ./secrets:/etc/prometheus/secrets:ro
|
|
- prometheus-data:/prometheus
|
|
expose:
|
|
- "9090"
|
|
networks:
|
|
- observability
|
|
|
|
networks:
|
|
observability:
|
|
name: hivegrid-observability
|
|
external: true
|
|
|
|
volumes:
|
|
prometheus-data:
|
|
name: hivegrid-prometheus-data
|