Implement phase 1 foundations
build-image / docker (push) Successful in 53s

This commit is contained in:
2026-07-03 20:14:06 -08:00
commit 6f7549d439
39 changed files with 2221 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# Loki Setup Runbook
## Starter local/Portainer stack
Use `deploy/loki/docker-compose.yml` and `deploy/loki/promtail-config.yml`.
```sh
cd deploy/loki
docker compose up -d
```
## Verify Loki
```sh
curl -fsS http://localhost:3100/ready
curl -G http://localhost:3100/loki/api/v1/labels
```
## Useful LogQL examples
```logql
{service="api"} |= "error"
{stack="second-brain"} |~ "(?i)(panic|fatal|exception)"
{stream="stderr"} |~ "(?i)(error|failed|timeout)"
```
## Portainer notes
For Portainer deployment, mount the Docker socket and Docker container log directory read-only into Promtail. The included compose does this for a single Docker host. Multi-node Swarm setups need Promtail on each node or another log shipping strategy.