Fix Prometheus and Loki permission errors
- Remove user directives from Prometheus and Loki services to allow root access to volumes - Add resource limits to all monitoring services (Prometheus, Grafana, Uptime Kuma, Loki) - Fixes permission denied errors when writing to named volumes
This commit is contained in:
@@ -17,6 +17,15 @@ services:
|
||||
# Access at: http://server-ip:9090
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.48.1
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.75'
|
||||
memory: 512M
|
||||
pids: 1024
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -35,7 +44,6 @@ services:
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
user: "${PUID:-1000}:${PGID:-1000}"
|
||||
labels:
|
||||
- "homelab.category=monitoring"
|
||||
- "homelab.description=Metrics collection and time-series database"
|
||||
@@ -52,6 +60,15 @@ services:
|
||||
# Default credentials: admin / admin (change on first login)
|
||||
grafana:
|
||||
image: grafana/grafana:10.2.3
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 256M
|
||||
pids: 512
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 128M
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -141,6 +158,15 @@ services:
|
||||
# Access at: https://uptime-kuma.${DOMAIN}
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:1
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 256M
|
||||
pids: 512
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 128M
|
||||
container_name: uptime-kuma
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -165,6 +191,15 @@ services:
|
||||
# Access at: http://server-ip:3100
|
||||
loki:
|
||||
image: grafana/loki:2.9.3
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.75'
|
||||
memory: 512M
|
||||
pids: 1024
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
container_name: loki
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -177,7 +212,6 @@ services:
|
||||
- ./config/loki:/etc/loki
|
||||
- loki-data:/loki
|
||||
command: -config.file=/etc/loki/loki-config.yml
|
||||
user: "${PUID:-1000}:${PGID:-1000}"
|
||||
labels:
|
||||
- "homelab.category=monitoring"
|
||||
- "homelab.description=Log aggregation system"
|
||||
|
||||
Reference in New Issue
Block a user