00-depot: add persistent Loki Alloy Grafana stack

This commit is contained in:
2026-07-31 11:10:47 +03:00
parent 7ac58cb1ea
commit 961f0112de
7 changed files with 878 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
services:
loki:
# This pin and the TSDB v13 on-disk format were validated on Fedora 44 in
# the 02-tekhnohim logging stack. Do not replace it with :latest during
# the data migration.
image: grafana/loki:3.7.2
container_name: loki
command: -config.file=/etc/loki/config.yaml
restart: unless-stopped
volumes:
- /mnt/containers/logging/loki-config/config.yaml:/etc/loki/config.yaml:ro,Z
- /mnt/containers/logging/loki-data:/loki:Z
ports:
# Retained for the existing operator query path.
- "3100:3100/tcp"
networks:
- logging-nw
alloy:
# Replaces the syslog-ng -> Promtail relay with one direct syslog receiver.
image: grafana/alloy:v1.16.1
container_name: alloy
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
restart: unless-stopped
depends_on:
- loki
volumes:
- /mnt/containers/logging/alloy-config/config.alloy:/etc/alloy/config.alloy:ro,Z
- /mnt/containers/logging/alloy-data:/var/lib/alloy/data:Z
ports:
# Existing fleet target: 185.108.4.158:514/udp.
- "514:514/udp"
# Preserve the old stack's TCP syslog endpoint.
- "601:601/tcp"
networks:
- logging-nw
grafana:
image: grafana/grafana:13.1.0
container_name: grafana
restart: unless-stopped
depends_on:
- loki
environment:
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD}
GF_USERS_ALLOW_SIGN_UP: "false"
volumes:
- /mnt/containers/logging/grafana-data:/var/lib/grafana:Z
- /mnt/containers/logging/grafana-config/provisioning/datasources:/etc/grafana/provisioning/datasources:ro,Z
- /mnt/containers/logging/grafana-config/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro,Z
- /mnt/containers/logging/grafana-config/dashboards:/var/lib/grafana/dashboards:ro,Z
ports:
# Retained for the current LAN/operator access path.
- "3000:3000/tcp"
networks:
- logging-nw
networks:
logging-nw: