This repository contains a self-hosted observability stack built with Docker Compose, designed for production-ready single-node setups using Grafana Labs components only.
The stack provides:
- 📄 Docker container logs → Loki
- 📊 Host metrics → Node Exporter → Alloy → Mimir
- 📈 Visualization & querying → Grafana
- 🔒 Only Grafana is exposed to the host
- 🧠 No classic Prometheus instance (Mimir acts as the PromQL backend)
| Service | Purpose |
|---|---|
| Loki | Log storage and querying |
| Alloy | Unified agent (logs + metrics) |
| Mimir | Prometheus-compatible metrics backend |
| Node Exporter | Exposes host metrics |
| Grafana | Visualization UI |
Docker containers logs
→ Alloy
→ Logs → Loki
→ Metrics → remote_write → Mimir → Grafana
Key design decisions:
- Logs are read directly from Docker json-file logs
- Metrics are scraped from node-exporter
- Alloy handles both logs and metrics
- Mimir replaces the need for a standalone Prometheus server
- Only Grafana is accessible from the host or public internet
- Type: Loki
- URL: http://loki:3100
- Type: Prometheus
- URL: http://mimir:9009/prometheus
- Only Grafana is exposed to the host
- Loki, Mimir, Alloy, and Node Exporter are internal to the Docker network
- no-new-privileges is enabled where possible
- Read-only mounts are used when applicable
- Healthchecks are intentionally disabled for Loki and Alloy because their images are distroless and do not include a shell or HTTP client.
- Alloy retries automatically, making explicit health gating unnecessary.
MIT