jhermesn/homelab-infra
소개
Uma infraestrutura de homelab baseada em Docker focada em Observabilidade e Segurança. Utiliza a stack LGTM (Loki, Grafana, Tempo, Mimir e Prometheus) com OpenTelemetry para monitoramento total, e Cloudflare Zero Trust + NGINX para exposição segura de serviços. Inclui gestão automatizada de backups (Rclone) e interfaces de administração.
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPersonal Homelab Infrastructure
Microservices and observability infrastructure based on Docker, focused on security, comprehensive monitoring, and ease of management to facilitate local testing of my services.
Architecture
Diagram

Services (Base Infrastructure)
| Service | Internal Host | Default Port | Function |
|---|---|---|---|
| Nginx Proxy Manager | homelab-npm |
8090 (HTTP) / 4443 (HTTPS) |
Gateway & SSL |
| Cloudflare Tunnel | homelab-tunnel |
N/A (Outbound) | Secure Remote Access |
| MySQL 8 | homelab-mysql |
3306 |
Relational Database |
| Adminer | homelab-adminer |
8080 |
Database Management |
| Redis | homelab-redis |
6379 |
Cache & Messaging |
| Redis Insight | homelab-redis-insight |
5540 |
Redis GUI |
| Grafana | homelab-grafana |
3000 |
Data Visualization |
| Loki | homelab-loki |
3100 |
Log Aggregation |
| Promtail | homelab-promtail |
N/A (Internal) | Log Shipping |
| Tempo | homelab-tempo |
3200 |
Distributed Tracing (Traces) |
| Prometheus | homelab-prometheus |
9090 |
Metrics Collection |
| Mimir | homelab-mimir |
9009 |
Long-term Metrics Storage |
| Uptime Kuma | homelab-uptime-kuma |
3001 |
Status Page & Monitoring |
| OTEL Collector | homelab-otel-collector |
4317 (gRPC) / 4318 (HTTP) |
Telemetry Ingestion |
| Node Exporter | homelab-node-exporter |
9100 |
Host Metrics |
| Dockge | homelab-dockge |
5001 |
Docker Web Management |
| Backup (Rclone) | Sidecar | N/A | Automatic Off-site Backup |
Setup
1. Prerequisites
- Docker and Docker Compose installed.
- Git.
2. Installation
git clone https://github.com/jhermesn/homelab-infra .
cp .env.example .env
nano .env # Setup your variables
# 3. (Optional) Setup Rclone for backup
# If you skip this, the backup service will fail but the infra will start.
# See the "Backup" section below.
3. Start Infrastructure
Use the deploy script to start the core infrastructure:
./deploy.sh infra start
Wait till you see the message: "[SUCCESS] Infrastructure started!".
Backup Configuration (SharePoint)
The backup-logs service uses Rclone to send old logs and traces to the cloud. Interactive setup is only needed the first time.
Adding New Services
- Copy the template:
cp -r services/_template services/my-new-app - Edit the
docker-compose.yaml(ensure thehomelabnetwork is configured). - Start with the script:
./deploy.sh service my-new-app
Useful Commands (Deploy Script)
The ./deploy.sh script manages everything:
./deploy.sh infra start-> Starts/Restarts the base infrastructure../deploy.sh infra stop-> Stops the base infrastructure../deploy.sh service <name>-> Starts a specific service (e.g.,demo-crud)../deploy.sh all-> Starts EVERYTHING../deploy.sh status-> Shows a summary of running containers../deploy.sh logs <container>-> Shortcut to view logs.
Updates / Maintenance
Since automatic deployment via CI/CD is not in use, to update the infrastructure (new versions of Docker Compose, .env, or scripts), manually execute on the server:
# 1. Update repository
git pull origin main
# 2. Update Docker images
docker compose pull
# 3. Restart infrastructure (recreates containers if necessary)
./deploy.sh infra
Observability
The stack comes pre-configured. To instrument your application (Node.js/Go/Python):
- Logs: Just log to stdout (console.log). Promtail collects automatically.
- Metrics/Traces: Send to
homelab-otel-collector:4317(gRPC) or:4318(HTTP).
Access http://localhost:3000 (Grafana) to visualize.
관련 프로젝트 살펴보기
불러오는 중…