Add full NAS service catalog for disaster recovery.
Compose files and configs for postgres, adguard, duckdns, homarr, neo4j, portainer, remotely, and monitoring; RESTORE.md and sync-from-nas script. Sanitize pgAdmin secrets; document homelab-command as separate repo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# Grafana — aparte stack (projectmap: homelab-command).
|
||||
#
|
||||
# Start (vanuit deze map):
|
||||
# export PG_PASSWORD='jouw_postgres_wachtwoord'
|
||||
# docker compose -f docker-compose.grafana.yml up -d --build
|
||||
#
|
||||
# UI: http://<NAS-IP>:3002 (standaard host-poort; 3001 was bezet op deze host)
|
||||
# login: admin / GRAFANA_ADMIN_PASSWORD
|
||||
#
|
||||
# Vereist: postgres container heet postgres-homelab en luistert intern op 5432.
|
||||
# Eénmalig (DNS tussen Prometheus en postgres-exporter op Synology bridge):
|
||||
# sh scripts/docker_monitoring_join.sh homelab-monitor
|
||||
# Daarna: docker network connect homelab-monitor postgres-homelab # als exporter DB niet bereikt
|
||||
#
|
||||
# Dashboards (Grafana.com IDs): PostgreSQL 9628, Proxmox 10347, Neo4j 10371,
|
||||
# Synology overview 14364, Node Exporter 1860 — onder folder "Infrastructure".
|
||||
# Prometheus scrape: postgres-exporter + optioneel Neo4j :2004 / Proxmox via targets/extra.yml.
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.53.2
|
||||
container_name: prometheus-homelab
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${PROMETHEUS_PORT:-9090}:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./prometheus/targets:/etc/prometheus/targets:ro
|
||||
- prometheus-homelab-data:/prometheus
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --web.enable-lifecycle
|
||||
networks:
|
||||
- homelab-monitor
|
||||
|
||||
postgres-exporter:
|
||||
image: prometheuscommunity/postgres-exporter:latest
|
||||
container_name: postgres-exporter-homelab
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${POSTGRES_EXPORTER_PORT:-9187}:9187"
|
||||
environment:
|
||||
DATA_SOURCE_NAME: "postgresql://${PG_USER:-mo}:${PG_PASSWORD}@postgres-homelab:5432/${PG_DATABASE:-homelab}?sslmode=disable"
|
||||
networks:
|
||||
- homelab-monitor
|
||||
|
||||
grafana:
|
||||
# Bouw image vanuit homelab-command repo (zie docker/monitoring/README.md)
|
||||
image: grafana-homelab:latest
|
||||
container_name: grafana-homelab
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${GRAFANA_PORT:-3002}:3000"
|
||||
environment:
|
||||
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin}
|
||||
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-changeme_grafana}
|
||||
GF_USERS_DEFAULT_THEME: dark
|
||||
GF_SERVER_ROOT_URL: ${GRAFANA_ROOT_URL:-http://localhost:3002}
|
||||
PG_USER: ${PG_USER:-mo}
|
||||
PG_DATABASE: ${PG_DATABASE:-homelab}
|
||||
HOMELAB_PG_PASSWORD: ${PG_PASSWORD:-}
|
||||
volumes:
|
||||
- grafana-homelab-data:/var/lib/grafana
|
||||
# Grafana provisioning/dashboards: clone homelab-command en mount paden daar
|
||||
depends_on:
|
||||
- prometheus
|
||||
networks:
|
||||
- homelab-monitor
|
||||
|
||||
volumes:
|
||||
grafana-homelab-data:
|
||||
prometheus-homelab-data:
|
||||
|
||||
networks:
|
||||
homelab-monitor:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user