Commit Graph

13 Commits

Author SHA1 Message Date
2f249d8dc7 Fix infrastructure stack resource limits corruption
- Fix malformed deploy.resources sections in dockge, pihole, glances
- Add missing resource limits to dozzle and code-server
- Ensure proper YAML indentation for reservations sections
- Apply researched resource limits based on service types:
  * Lightweight: dockge (0.5 CPU), pihole (0.25 CPU)
  * Web services: dozzle, glances (0.5 CPU each)
  * Heavy apps: code-server (1.5 CPU for full IDE)
- Validate both deployed and repository configurations
2026-01-15 21:36:14 -05:00
adb894d35e Round 10: Add Traefik routing to monitoring services
- Added Traefik labels and routing to prometheus, grafana, loki, cadvisor
- Fixed Grafana ROOT_URL to use domain-based URL (https://grafana.${DOMAIN})
- Added uptime-kuma bypass rule in Authelia (needs initial setup)
- Updated all services to use traefik-network
- Synced domain from kelin-hass to kelin-casa across all configs
- Fixed missing tls=true label on uptime-kuma
- Note: Loki is API-only service (no web UI, accessed via Grafana)
2026-01-14 23:08:37 -05:00
650700ed0a Re-enable Watchtower with correct Docker API version
Fixes:
- docker-compose/infrastructure.yml:
  - Uncommented Watchtower service
  - Updated image from 1.7.1 to latest
  - Changed DOCKER_API_VERSION from 1.44 to 1.52 (current Docker version)
  - Added default empty value for WATCHTOWER_NOTIFICATION_URL

- scripts/deploy-homelab.sh:
  - Removed "temporarily disabled" note
  - Added Watchtower to infrastructure stack list

- docs/services-overview.md:
  - Updated infrastructure stack count from 7 to 8
  - Added Watchtower to service list

Watchtower now runs successfully with scheduled updates at 4 AM daily
2026-01-14 02:25:20 -05:00
f79a2ab6f1 Fix infrastructure.yml networks section
- Added missing 'networks:' header
- Changed homelab-network and dockerproxy-network to external: true
- Added missing traefik-network definition
- Removed incorrect 'driver: bridge' declarations
2026-01-14 01:39:59 -05:00
aa3f927b2c Reorganize docker-compose stacks for better service grouping
Stack changes:
- Renamed media-extended.yml → media-management.yml (better clarity)
- Moved Plex from media → alternatives (Jellyfin is primary)
- Moved code-server from utilities → infrastructure
- Moved Sonarr, Radarr, Prowlarr from media → media-management
- Moved Calibre-web from media-management → media

New stack organization:
- media.yml (3): Jellyfin, Calibre-web, qBittorrent
- media-management.yml (13): All *arr apps, transcoders
- alternatives.yml (6): Plex, Portainer, Authentik
- infrastructure.yml (7): Added code-server
- utilities.yml (6): Removed code-server

Documentation updated:
- README.md: Updated stack descriptions
- services-overview.md: Updated service counts and locations
- All service docs: Updated file paths media-extended → media-management
2026-01-14 01:32:20 -05:00
487f645652 Round 9: Homepage variable replacement and additional stack deployment
Features added:
 Homepage config variable replacement - Fixed HOMEPAGE_VAR_DOMAIN substitution
  - Homepage doesn't support environment variables in configs
  - Deploy script now uses sed to replace {{HOMEPAGE_VAR_DOMAIN}} with actual domain
  - All homepage/*.yaml files processed after template copy

 Additional stacks deployment to Dockge
  - 7 additional stacks now copied to /opt/stacks/: media, media-extended,
    homeassistant, productivity, monitoring, utilities, alternatives
  - Stacks are NOT started automatically - user deploys via Dockge UI as needed
  - Optional image pre-pull with user prompt (defaults to no)
  - Significantly improves first-time Dockge experience

 Watchtower temporarily disabled
  - Documented Docker API v1.44 compatibility issue with Docker 29.x
  - Added clear instructions for re-enabling when issue is resolved
  - Infrastructure stack now deploys 6 services (was 7)

Deployment workflow:
1. Core stack (4 services) - DuckDNS, Traefik, Authelia, Gluetun
2. Infrastructure stack (6 services) - Dockge, Pi-hole, Dozzle, Glances, Docker Proxy
3. Dashboards stack (2 services) - Homepage (configured), Homarr
4. Additional stacks (7 stacks copied, not started)

Tested: All 11 active containers healthy, all stacks visible in Dockge
2026-01-13 21:36:38 -05:00
cf061f35d2 Fix: Resolve password hash corruption in Authelia users_database.yml
Critical fix for argon2 password hash preservation:
- Root cause: Bash variable expansion of $ characters in argon2id hashes
- Solution: Write hash directly from Docker output to file, bypass bash variables entirely
- setup-homelab.sh: Stream Docker output directly to /tmp/authelia_password_hash.tmp
- deploy-homelab.sh: Read hash file in Python to avoid any bash expansion
- Result: Password hash correctly preserved with full $argon2id$v=19$m=... format

Other changes:
- Added DOCKER_API_VERSION=1.44 env var for watchtower (API compatibility)
- Watchtower still has issues with Docker 29.1.4 - keeping version pinned for investigation

Tested on Debian 12 with Docker 29.1.4:
 All 11 critical containers healthy
 Authelia authentication working correctly
 Password hash preserved through entire deployment workflow
⚠️  Watchtower restart loop (non-critical, under investigation)
2026-01-13 21:02:49 -05:00
f0a3907002 Round 4 improvements: automated config, relative paths, simplified deployment
- Automate Traefik email substitution in deploy script
- Auto-generate Authelia admin password (saved to ADMIN_PASSWORD.txt)
- Standardize all volume paths to use relative paths (./service/config)
- Switch Traefik to HTTP challenge by default (DNS challenge optional)
- Update documentation with improved setup instructions
- Enhance troubleshooting guide
- Update AGENT_INSTRUCTIONS with new conventions
- Simplify .env.example with clearer guidance

These changes reduce manual configuration steps and improve deployment reliability.
2026-01-13 18:30:06 -05:00
90462cd179 Fix SSL wildcard certificate setup
- Remove individual certresolver labels from all services except Traefik
- Configure wildcard certificate (*.kelin-hass.duckdns.org) on Traefik only
- Remove AUTHELIA_NOTIFIER_SMTP_PASSWORD env var (filesystem notifier only)
- Fix infrastructure.yml networks section syntax
- Add wildcard SSL certificate setup action report

All services now use single wildcard Let's Encrypt certificate.
Resolves DNS challenge conflicts with DuckDNS provider.
2026-01-12 23:19:27 -05:00
copilot-swe-agent[bot]
c7ca73fe78 Add Authentik SSO, fix Uptime Kuma duplicate, enable SSO on Jellyseerr, and improve documentation
- Add Authentik service stack to infrastructure.yml
  - Includes Authentik server, worker, PostgreSQL database, and Redis
  - Alternative SSO with web UI for user management
  - Access at authentik.${DOMAIN}
  - Protected by Authelia SSO (comment out to use standalone)

- Fix Uptime Kuma duplicate listing
  - Remove from utilities.yml
  - Keep only in monitoring.yml where it belongs
  - Add Traefik labels and SSO protection to monitoring instance

- Enable SSO on Jellyseerr by default
  - Changed from bypass to protected (security-first approach)
  - Users can comment out SSO if needed for public access

- Update SSO toggling documentation
  - Emphasize commenting out (not removing) middleware line
  - Add docker command examples for running from outside stack folder
  - Show both "cd to directory" and "full path" methods
  - Add examples for starting and stopping services multiple ways

- Enhance security-first methodology
  - Update copilot instructions to default SSO to enabled
  - Only Plex and Jellyfin bypass SSO by default
  - All other services start secured, expose gradually
  - Emphasize commenting (not removing) for easier re-enable

- Update services-reference.md
  - Add Authentik to infrastructure section (12 services)
  - Move Uptime Kuma to monitoring section (8 services)
  - Remove from utilities (now 6 services)
  - Update Jellyseerr SSO status from ✗ to ✓
  - Improve Authentik documentation with deployment guidance

- Add Authentik environment variables to .env.example
  - AUTHENTIK_SECRET_KEY, DB credentials
  - Generation instructions included

All changes align with security-first principle: start secure, expose services only when ready for deployment.

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 02:33:31 +00:00
copilot-swe-agent[bot]
63f39e51a4 Add comprehensive service stacks: Dockge, Homepage, Home Assistant, and all user services
- Add Dockge to infrastructure (primary over Portainer)
- Create dashboards.yml with Homepage and Homarr (AI-configurable)
- Create homeassistant.yml with HA, ESPHome, TasmoAdmin, Node-RED, Mosquitto, Zigbee2MQTT, MotionEye
- Create media-extended.yml with Readarr, Lidarr, Lazy Librarian, Mylar3, Calibre-Web, Jellyseerr, FlareSolverr, Tdarr, Unmanic
- Create productivity.yml with Nextcloud, Mealie, WordPress, Gitea, DokuWiki, BookStack, MediaWiki (all with databases)
- Create utilities.yml with Backrest, Duplicati, Uptime Kuma, Code Server, Form.io, Authelia Redis
- Add Homepage configuration templates (services.yaml, docker.yaml, settings.yaml, widgets.yaml)
  - All services include container names for Docker integration
  - Widgets configured for services that support them (Sonarr, Radarr, Plex, Jellyfin, etc.)
  - Organized by category with proper layouts
- Create docs/proxying-external-hosts.md - comprehensive guide for proxying Raspberry Pi and other external hosts via Traefik
- Update .env.example with all new service credentials and Homepage API keys
- Update infrastructure.yml to prioritize Dockge, add Dozzle, Glances, Docker Proxy
- All services configured with /opt/stacks paths, Traefik labels, and appropriate Authelia middleware

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 01:00:30 +00:00
copilot-swe-agent[bot]
f9a34fe9c7 Implement Dockge structure with Traefik, Authelia, DuckDNS, and Gluetun VPN
- Update AI copilot instructions for /opt/stacks structure and automated config management
- Replace Nginx Proxy Manager with Traefik (file-based configuration for AI)
- Add Authelia for SSO with bypass rules for Jellyfin/Plex apps
- Add DuckDNS for dynamic DNS with Let's Encrypt integration
- Add Gluetun VPN with Surfshark (WireGuard) for secure downloads
- Update all services to use /opt/stacks paths instead of local directories
- Add Traefik labels to all services for automatic routing
- Configure qBittorrent to route through Gluetun VPN
- Update .env.example with all new required variables
- Create configuration templates for Traefik and Authelia
- Add comprehensive Dockge deployment guide

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 00:13:55 +00:00
copilot-swe-agent[bot]
1b1464e278 Create AI chat agent for VS Code with Docker service management
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:50:55 +00:00