Validate Chapter 5 deployment: monitoring/compose.yaml

This commit is contained in:
2026-10-30 19:38:47 +00:00
parent 4831e43c1e
commit dcb7524916
+15 -5
View File
@@ -2,12 +2,13 @@ name: monitoring
services: services:
prometheus: prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:?Set PROMETHEUS_VERSION} image: prom/prometheus:${PROMETHEUS_VERSION:-v3.15.1}
restart: unless-stopped restart: unless-stopped
command: command:
- --config.file=/etc/prometheus/prometheus.yml - --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus - --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=7d - --storage.tsdb.retention.time=7d
- --storage.tsdb.retention.size=512MB
- --web.listen-address=0.0.0.0:9090 - --web.listen-address=0.0.0.0:9090
volumes: volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
@@ -18,13 +19,17 @@ services:
- no-new-privileges:true - no-new-privileges:true
grafana: grafana:
image: grafana/grafana:${GRAFANA_VERSION:?Set GRAFANA_VERSION} image: grafana/grafana:${GRAFANA_VERSION:-13.3.0-slim}
restart: unless-stopped restart: unless-stopped
environment: environment:
GF_SECURITY_ADMIN_USER: admin GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:?Set GRAFANA_ADMIN_PASSWORD} GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:?Set GRAFANA_ADMIN_PASSWORD}
GF_PLUGINS_PREINSTALL_DISABLED: "true"
GF_PLUGINS_PREINSTALL_AUTO_UPDATE: "false"
GF_AUTH_ANONYMOUS_ENABLED: "false" GF_AUTH_ANONYMOUS_ENABLED: "false"
GF_USERS_ALLOW_SIGN_UP: "false" GF_USERS_ALLOW_SIGN_UP: "false"
GF_SECURITY_COOKIE_SECURE: "true"
GF_ANALYTICS_REPORTING_ENABLED: "false"
GF_SERVER_ROOT_URL: ${GRAFANA_ROOT_URL:?Set GRAFANA_ROOT_URL} GF_SERVER_ROOT_URL: ${GRAFANA_ROOT_URL:?Set GRAFANA_ROOT_URL}
volumes: volumes:
- grafana_data:/var/lib/grafana - grafana_data:/var/lib/grafana
@@ -37,7 +42,7 @@ services:
- no-new-privileges:true - no-new-privileges:true
node-exporter: node-exporter:
image: quay.io/prometheus/node-exporter:${NODE_EXPORTER_VERSION:?Set NODE_EXPORTER_VERSION} image: quay.io/prometheus/node-exporter:${NODE_EXPORTER_VERSION:-v1.12.1}
restart: unless-stopped restart: unless-stopped
command: command:
- --path.rootfs=/host - --path.rootfs=/host
@@ -52,14 +57,19 @@ services:
- no-new-privileges:true - no-new-privileges:true
blackbox-exporter: blackbox-exporter:
image: quay.io/prometheus/blackbox-exporter:${BLACKBOX_EXPORTER_VERSION:?Set BLACKBOX_EXPORTER_VERSION} image: quay.io/prometheus/blackbox-exporter:${BLACKBOX_EXPORTER_VERSION:-v0.29.1}
restart: unless-stopped restart: unless-stopped
command: command:
- --config.file=/etc/blackbox/blackbox.yml - --config.file=/etc/blackbox/blackbox.yml
volumes: volumes:
- ./blackbox/blackbox.yml:/etc/blackbox/blackbox.yml:ro - ./blackbox/blackbox.yml:/etc/blackbox/blackbox.yml:ro
extra_hosts:
- "ci.165.227.90.215.sslip.io:${CADDY_PRIVATE_IP:?Set CADDY_PRIVATE_IP}"
- "git.sespinal590.dev:${CADDY_PRIVATE_IP:?Set CADDY_PRIVATE_IP}"
networks: networks:
- monitoring_private monitoring_private:
gitea_proxy:
ipv4_address: 172.18.0.250
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true