From ea00ad6d25fa5cf4b8dc51f4b0a02fda0eea605e Mon Sep 17 00:00:00 2001 From: Daniel Dada Date: Wed, 25 Feb 2026 00:22:44 +0300 Subject: [PATCH] added node exporher --- README.md | 77 ++++++++++++++++++++++++++++ stacks/monitoring/glance.env.example | 13 ----- stacks/monitoring/grafana.yaml | 16 ++++++ 3 files changed, 93 insertions(+), 13 deletions(-) create mode 100644 README.md delete mode 100644 stacks/monitoring/glance.env.example diff --git a/README.md b/README.md new file mode 100644 index 0000000..39573a3 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Homelab + +## Prerequisites + +- **Docker** and **Docker Compose** +- Host paths used by the stacks: + - `/srv/homelab` + - `/srv/media` + - `/backup` + +## Setup + +### 1. Media dirs + +```bash +sudo mkdir -p /srv/media/{movies,shows,downloads,immich} +sudo chown -R 1000:1000 /srv/media +``` + +### 2. Monitoring premissions + +```bash +sudo mkdir -p /srv/homelab/data/monitoring/{prometheus,loki,grafana} +sudo chown -R 65534:65534 /srv/homelab/data/monitoring/prometheus +sudo chown -R 10001:10001 /srv/homelab/data/monitoring/loki +sudo chown -R 472:472 /srv/homelab/data/monitoring/grafana +``` + +### 3. Env + +- **Glance:** `stacks/monitoring/glance.env` +- **Immich:** `stacks/media/immich.env` + +## Deploying + +From the repo root (`/srv/homelab`): + +| Stack | Command | +|------------|---------| +| **Media** | `docker compose -f stacks/media/compose.yaml up -d` | +| **Monitoring** | `docker compose -f stacks/monitoring/compose.yaml up -d` | +| **Storage** | `docker compose -f stacks/storage/compose.yaml up -d` | + +To update images: + +```bash +docker compose -f stacks/media/compose.yaml pull +docker compose -f stacks/media/compose.yaml up -d +``` + +To stop a stack: + +```bash +docker compose -f stacks/media/compose.yaml down +``` + +## Ports + +| Service | Port(s) | Stack | +|-----------|-------------|-----------| +| Sonarr | 8989 | media | +| Radarr | 7878 | media | +| Lidarr | 8686 | media | +| Prowlarr | 9696 | media | +| qBittorrent | 8081, 6881 (tcp/udp) | media | +| Jellyfin | 8096 | media | +| Immich | 2283 | media | +| Navidrome | 4533 | media | +| Seer | 5055 | media | +| Grafana | 3034 | monitoring | +| Prometheus| 9094 | monitoring | +| Loki | 3100 | monitoring | +| cAdvisor | 8088 | monitoring | +| Glance | 9090 | monitoring | +| Portainer | 9443, 8000 | monitoring | +| Gitea | 3000, 222 | storage | +| Copyparty | 3923 | storage | diff --git a/stacks/monitoring/glance.env.example b/stacks/monitoring/glance.env.example deleted file mode 100644 index 8280251..0000000 --- a/stacks/monitoring/glance.env.example +++ /dev/null @@ -1,13 +0,0 @@ -MY_SECRET_TOKEN=change_me -RADARR_URL=http://radarr.home -RADARR_API_URL=http://radarr.home -RADARR_KEY=change_me -SONARR_URL=http://sonarr.home -SONARR_API_URL=http://sonarr.home -SONARR_KEY=change_me -LIDARR_URL=http://lidarr.home -LIDARR_API_URL=http://lidarr.home -LIDARR_KEY=change_me -PORTAINER_URL=http://portainer.home -PORTAINER_ENDPOINT_ID=1 -PORTAINER_API_KEY=change_me diff --git a/stacks/monitoring/grafana.yaml b/stacks/monitoring/grafana.yaml index a29c89e..59a5ed4 100644 --- a/stacks/monitoring/grafana.yaml +++ b/stacks/monitoring/grafana.yaml @@ -38,6 +38,22 @@ services: max-size: "10m" max-file: "5" + node_exporter: + image: quay.io/prometheus/node-exporter:latest + container_name: node_exporter + command: + - '--path.rootfs=/host' + network_mode: host + pid: host + restart: unless-stopped + volumes: + - '/:/host:ro,rslave' + logging: + driver: json-file + options: + max-size: "10m" + max-file: "5" + grafana: image: grafana/grafana:latest container_name: grafana