46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
# Prometheus stack for the boilerplate.
|
|
#
|
|
# 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
|
|
container_name: boilerplate-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
|
|
- --web.enable-lifecycle
|
|
- --web.external-url=https://prometheus.boiler.saas-ctrl.com
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- ./secrets:/etc/prometheus/secrets:ro
|
|
- prometheus-data:/prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
networks:
|
|
- observability
|
|
|
|
networks:
|
|
observability:
|
|
name: boilerplate-observability
|
|
external: true
|
|
|
|
volumes:
|
|
prometheus-data:
|
|
name: boilerplate-prometheus-data
|