89 lines
2.7 KiB
YAML
89 lines
2.7 KiB
YAML
name: homelab-prometheus
|
|
services:
|
|
prometheus:
|
|
image: prom/prometheus:v3.11.3
|
|
container_name: homelab-prometheus
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
mem_limit: 1536m
|
|
cpus: 1.5
|
|
healthcheck:
|
|
test: [CMD, wget, -q, -O, /dev/null, 'http://127.0.0.1:19090/-/ready']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 120s
|
|
command:
|
|
- --config.file=/etc/prometheus/prometheus.yaml
|
|
- --storage.tsdb.path=/prometheus
|
|
- --storage.tsdb.retention.time=7d
|
|
- --storage.tsdb.retention.size=12GB
|
|
- --web.listen-address=:19090
|
|
- --web.enable-lifecycle
|
|
volumes:
|
|
- ./config/prometheus:/etc/prometheus:ro
|
|
- ./config/k8s:/var/run/secrets/kubernetes.io/serviceaccount:ro
|
|
- ./data/prometheus:/prometheus
|
|
alertmanager:
|
|
image: prom/alertmanager:v0.32.1
|
|
container_name: homelab-alertmanager
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
mem_limit: 256m
|
|
cpus: 0.5
|
|
healthcheck:
|
|
test: [CMD, wget, -q, -O, /dev/null, 'http://127.0.0.1:19093/-/ready']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
command:
|
|
- --config.file=/etc/alertmanager/alertmanager.yaml
|
|
- --storage.path=/alertmanager
|
|
- --web.listen-address=:19093
|
|
- --cluster.listen-address=
|
|
volumes:
|
|
- ./config/alertmanager:/etc/alertmanager:ro
|
|
- ./data/alertmanager:/alertmanager
|
|
grafana:
|
|
image: grafana/grafana:13.0.1-security-01
|
|
container_name: homelab-grafana
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
mem_limit: 512m
|
|
cpus: 1
|
|
healthcheck:
|
|
test: [CMD, wget, -q, -O, /dev/null, 'http://127.0.0.1:13000/api/health']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 60s
|
|
environment:
|
|
GF_SERVER_HTTP_PORT: '13000'
|
|
GF_PATHS_CONFIG: /etc/grafana/grafana.ini
|
|
GF_PATHS_PROVISIONING: /etc/grafana/provisioning
|
|
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET__FILE: /etc/grafana/secrets/client-secret
|
|
volumes:
|
|
- ./config/grafana:/etc/grafana:ro
|
|
- ./data/grafana:/var/lib/grafana
|
|
- ./data/grafana-search:/var/lib/grafana-search
|
|
loki:
|
|
image: homelab/loki:3.6.7
|
|
build:
|
|
context: .
|
|
dockerfile: loki.Dockerfile
|
|
container_name: homelab-loki
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
mem_limit: 768m
|
|
cpus: 0.5
|
|
command: [-config.file=/etc/loki/config.yaml, -target=all]
|
|
healthcheck:
|
|
test: [CMD, /usr/local/bin/busybox, wget, -q, -O, /dev/null, 'http://127.0.0.1:13100/ready']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 120s
|
|
volumes:
|
|
- ./config/loki:/etc/loki:ro
|
|
- ./data/loki:/var/loki
|