Changes:
- Reviewed all docker-compose files to identify required variables
- Updated all .env.example files to include ONLY variables used in their respective compose files
- Changed all placeholder values to empty strings for cleaner configuration
- Fixed variable name inconsistency: DOWNLOADS_DIR -> DOWNLOAD_DIR (to match main .env)
- Removed unnecessary variables that aren't used by the compose files
All .env.example files now:
- Contain only the variables actually used in the stack
- Have empty values instead of example placeholders
- Match the variable names used in docker-compose files
This ensures clean, minimal .env files for each stack without any extraneous variables or confusing placeholder values.
Major improvements to environment variable management:
1. Added .env.example files for ALL stacks
- Each stack now has its own .env.example with only required variables
- Variables include comments explaining their purpose
- Examples: core, dockge, infrastructure, dashboards, arcane, media, media-management, transcoders, monitoring, sablier, utilities, productivity, wikis, vpn, homeassistant, alternatives
2. Created .env.global generation
- Generates /opt/stacks/.env.global with all variables
- Strips comments and blank lines for clean output
- Available to all stacks for reference
3. Improved variable replacement strategy
- Variable replacement now ONLY targets labels and x-dockge sections in docker-compose files
- Configuration files (traefik, authelia) still get full variable replacement
- Uses Python script for precise section detection
- Preserves environment variables and volume mounts as-is
4. New deployment approach
- Each stack copies .env.example to .env
- Values populated from main ~/EZ-Homelab/.env file
- No more manual sed commands to remove unused variables
- Consistent approach across all deployment functions
5. Updated deployment functions
- deploy_dockge, deploy_core, deploy_infrastructure, deploy_dashboards, deploy_arcane, deploy_sablier_stack
- All now use process_stack_env() for clean .env handling
- All use updated localize_yml_file() for targeted variable replacement
Benefits:
- Clean, minimal .env files for each stack
- No unnecessary variables or comments in deployed .env files
- Variables in compose files preserved for Docker Compose to handle
- Easier to understand what each stack needs
- Uniform deployment approach across all stacks
- Reorganize Authelia configuration files
- Add new dynamic routing files for Traefik
- Update various service docker-compose files
- Remove outdated templates and scripts
- Add traefik.docker.network=traefik-network label to all local services with traefik.enable=true
- Ensures consistent network selection for Traefik IP discovery
- Prevents routing conflicts when services are on multiple networks
- Updated 12 docker-compose files with 32+ service labels
- Maintains dual network access (homelab-network + traefik-network) for web UIs
- Add traefik.docker.network=traefik-network label to homepage service
- Prevent Traefik from using wrong IP from homelab-network
- Resolve 504 Gateway Timeout issues after authentication
- Update various docker-compose configurations and templates
- Clean up unused configuration files
- Add Sablier middleware to all 32 services across stacks
- Update vaultwarden port from 80 to 8091 to avoid conflicts
- Add tdarr-server and unmanic services with lazy loading
- Optimize health checks (wget for some services, dozzle built-in)
- Update Traefik routers and service definitions
- Update port documentation
All services now support on-demand startup via Sablier middleware.
- Add health checks to all services using Sablier lazy loading
- Utilities stack: Backrest, Duplicati, Form.io, Vaultwarden
- Productivity stack: Nextcloud, WordPress, Gitea, BookStack, MediaWiki
- Media Management stack: Sonarr, Radarr, Prowlarr, Jellyseerr
- Infrastructure stack: Dozzle, Glances, Code Server
- Dashboards stack: Homarr
- Health checks use curl to service endpoints with 30s intervals
- Appropriate start_period delays for service initialization
- This resolves Sablier warnings about missing health checks
- Resolve port conflicts: TasmoAdmin (8084), Form.io (3002), Gitea (3010)
- Add missing Authelia SSO and Sablier lazy loading to utilities stack
- Standardize Form.io labels to match TRAEFIK CONFIGURATION guidelines
- Reorganize ports-in-use.md with stack-based table and proper column order
- Remove Dokuwiki deployment from ez-homelab.sh (already in productivity stack)
- Update service restart policies for lazy loading compatibility
- Remove authelia middleware from Vaultwarden (Bitwarden) for app compatibility
- Simplify all compose files to use only homelab-network and traefik-network
- Remove unnecessary isolated networks (nextcloud-network, wordpress-network, etc.)
- Remove monitoring-network, formio-network, and media-network
- All services now communicate through the unified homelab-network
- Maintain traefik-network for proxied services only
- Uncomment Authelia middleware for Vaultwarden (was disabled for app compatibility but should use SSO by default)
- Verify all other services have Authelia middleware except:
- Jellyfin (media app access)
- Plex (media app access)
- Authelia itself (authentication service)
- All x-dockge sections are properly formatted with urls list
- Replace all ${VARIABLE:-default} with ${VARIABLE} in compose files
- Ensure explicit variable requirements without default values
- Updated 10 docker-compose.yml files across all stacks
- Made reset-ondemand-services.sh executable
- Update infrastructure services (dozzle, glances, code-server) to new format
- Update dashboards (homarr) to new format
- Update utilities (backrest, duplicati) to new format
- Update productivity (nextcloud) to new format
- Add authelia middleware to all services except Jellyfin
- Ensure consistent label structure across all stacks
- Change ${SERVER_HOSTNAME:-debian} to ${SERVER_HOSTNAME} in Sablier groups
- Prevents empty default values that were causing configuration errors
- Applied to dashboards, infrastructure, media, productivity, and utilities stacks
- Add SERVER_HOSTNAME env var for Sablier group naming
- Update default hostname from 'jarvis' to 'debian' for generic repo compatibility
- Add restart policy documentation to all docker-compose files
- Add Sablier labels to lazy-loaded services (jellyfin, dozzle, glances, code-server, homarr, dokuwiki)
- Update sablier.yml template to use debian- prefixes
- Enhance deploy script to auto-detect hostname and update configurations
- Ensure all YAML files remain syntactically valid
- Added x-dockge.url=https://service. labels to all services that have Traefik routers
- Enables Dockge to display direct links to service web interfaces
- Covers all stacks: core, infrastructure, media, productivity, monitoring, utilities, etc.