Repository navigation
Expand file tree
/
Copy pathdocker-compose.monitoring.yaml
More file actions
52 lines (49 loc) · 1.9 KB
/
Copy pathdocker-compose.monitoring.yaml
File metadata and controls
52 lines (49 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Docker Compose override for Prometheus + Grafana monitoring stack
# Use with: docker compose -f docker-compose.yaml -f docker-compose.monitoring.yaml up -d
services:
prometheus:
image: "prom/prometheus:latest"
container_name: nexusgate-prometheus
volumes:
- "./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro"
- "prometheus_data:/prometheus"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
- '--storage.tsdb.retention.time=15d'
ports:
- "${PROMETHEUS_PORT:-9090}:9090"
restart: on-failure
depends_on:
- nexusgate
grafana:
image: "grafana/grafana:latest"
container_name: nexusgate-grafana
environment:
- "GF_SECURITY_ADMIN_USER=${GRAFANA_USER:-admin}"
- "GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}"
- "GF_USERS_ALLOW_SIGN_UP=false"
- "GF_SERVER_ROOT_URL=http://localhost:${GRAFANA_PORT:-3001}"
# ============================================================
# SECURITY NOTE: The following settings enable anonymous access
# and iframe embedding for local development convenience.
# For production, consider using Grafana's Public Dashboard
# feature or an auth proxy instead of anonymous access.
# ============================================================
# Enable anonymous access for iframe embedding (read-only Viewer role)
- "GF_AUTH_ANONYMOUS_ENABLED=true"
- "GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer"
# Allow embedding in iframes (disables X-Frame-Options: deny)
- "GF_SECURITY_ALLOW_EMBEDDING=true"
volumes:
- "grafana_data:/var/lib/grafana"
- "./grafana/provisioning:/etc/grafana/provisioning:ro"
ports:
- "${GRAFANA_PORT:-3001}:3000"
restart: on-failure
depends_on:
- prometheus
volumes:
prometheus_data:
grafana_data: