From 9f06b7d7f56b9bce3583e3f776394c4f5a5516e8 Mon Sep 17 00:00:00 2001 From: MSWS Date: Sun, 16 Mar 2025 21:14:13 -0700 Subject: [PATCH] Configure Caddy and Prometheus for internal service communication - Configure Caddy admin settings for inter-service communication - Set up reverse proxy for Prometheus in Caddyfile - Implement new scrape configuration for Caddy in Prometheus settings - Add scrape target for Caddy listening on port 2019 --- caddy/Caddyfile | 4 ++++ caddy/compose.yml | 1 + grafana/prometheus.yml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 9042355..064918d 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -60,6 +60,10 @@ stats.local.msws.xyz { reverse_proxy grafana:3000 } +prom.local.msws.xyz { + reverse_proxy prometheus:9090 +} + photos.local.msws.xyz, photos.msws.xyz { reverse_proxy immich_server:2283 } diff --git a/caddy/compose.yml b/caddy/compose.yml index 52e8357..fe62dd7 100644 --- a/caddy/compose.yml +++ b/caddy/compose.yml @@ -17,6 +17,7 @@ services: - caddy_config:/config environment: - CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN} + - CADDY_ADMIN=caddy-caddy-1:2019 networks: - cloudflared diff --git a/grafana/prometheus.yml b/grafana/prometheus.yml index 898fc7f..6b2b553 100644 --- a/grafana/prometheus.yml +++ b/grafana/prometheus.yml @@ -37,3 +37,6 @@ scrape_configs: bearer_token: 'ZmNmZjkxZDktODU0YS00NDRiLWE2N2YtZTRkZjY5ZGZiZDI4Cg==' static_configs: - targets: [ 'wakapi:3002' ] + - job_name: caddy + static_configs: + - targets: [ 'caddy-caddy-1:2019' ]