refactor: Standardize compose file labels using dashboards template

- Apply consistent label structure across all compose files
- Include complete Traefik and Sablier labels for all services
- Enable Sablier by default for services with middleware definitions
- Comment out Sablier labels for services without middleware
- Add explanatory comments for remote Traefik configurations
- Comment out Authelia middleware where not appropriate (media apps, public services)
- Maintain existing configuration data and functionality
This commit is contained in:
EZ-Homelab
2026-01-23 16:20:26 -05:00
parent a8835801a7
commit 38732817e1
4 changed files with 89 additions and 69 deletions

View File

@@ -1,22 +1,14 @@
# Dashboard Services
# Homepage and Homarr for homelab dashboards
# Place in /opt/stacks/dashboards/docker-compose.yml
# SABLIER SESSION DURATION: Set to 5m for testing. Increase to 30m for production in config-templates/traefik/dynamic/sablier.yml
# RESTART POLICY GUIDE:
# - unless-stopped: Core infrastructure services that should always run
# - no: Services with Sablier lazy loading (start on-demand)
# - See individual service comments for specific reasoning
# Service Access URLs:
# - Homepage: https://home.${DOMAIN}
# - Homepage: https://homepage.${DOMAIN}
# - Homarr: https://homarr.${DOMAIN}
services:
# Homepage - Application dashboard (AI-configurable via YAML)
# Access at: https://home.${DOMAIN}
# Dashboard service should always run for quick access to service overview
# Homepage - Default Application Dashboard
homepage:
image: ghcr.io/gethomepage/homepage:latest
deploy:
@@ -29,7 +21,7 @@ services:
cpus: '0.25'
memory: 128M
container_name: homepage
restart: unless-stopped
restart: unless-stopped # change to 'no' to enable Sablier lazy loading
networks:
- homelab-network
- traefik-network
@@ -43,26 +35,28 @@ services:
- PUID=995 # Must be set to the docker user ID
- PGID=995 # Must be set to the docker group ID
- TZ=${TZ}
- HOMEPAGE_ALLOWED_HOSTS=home.${DOMAIN}
- HOMEPAGE_ALLOWED_HOSTS=homepage.${DOMAIN}
labels:
# ==========================================
# TRAEFIK CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=dashboard"
- "homelab.description=Application dashboard (AI-configurable)"
# Traefik reverse proxy (uncomment to enable)
- "homelab.description=Application dashboard"
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.homepage.rule=Host(`home.${DOMAIN}`)"
- "traefik.http.routers.homepage.rule=Host(`homepage.${DOMAIN}`)"
- "traefik.http.routers.homepage.entrypoints=websecure"
- "traefik.http.routers.homepage.tls=true"
- "traefik.http.routers.homepage.middlewares=authelia@docker"
- "traefik.http.services.homepage.loadbalancer.server.port=3000"
# Sablier lazy loading (disabled by default - uncomment to enable)
# - "sablier.enable=true"
# - "sablier.group=${SERVER_HOSTNAME:-debian}-homarr"
# - "sablier.start-on-demand=true"
# Homarr - Modern dashboard
# Access at: https://homarr.${DOMAIN}
# Uses Sablier lazy loading - starts on-demand, stops after 5min inactivity
homarr:
image: ghcr.io/ajnart/homarr:latest
@@ -90,34 +84,30 @@ services:
environment:
- TZ=${TZ}
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=dashboard"
- "homelab.description=Modern homelab dashboard"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.homarr.rule=Host(`homarr.${DOMAIN}`)"
- "traefik.http.routers.homarr.entrypoints=websecure"
- "traefik.http.routers.homarr.tls=true"
- "traefik.http.routers.homarr.middlewares=authelia@docker"
- "traefik.http.services.homarr.loadbalancer.server.port=7575"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-homarr"
- "sablier.start-on-demand=true"
# ==========================================
# DOCKGE URL CONFIGURATION
# ==========================================
x-dockge:
urls:
# Proxied URLs (through Traefik)
- https://home.${DOMAIN}
- https://homepage.${DOMAIN}
- https://homarr.${DOMAIN}
networks:

View File

@@ -139,22 +139,20 @@ services:
- DOZZLE_TAILSIZE=300
- DOZZLE_FILTER=status=running
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=infrastructure"
- "homelab.description=Real-time Docker log viewer"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.dozzle.rule=Host(`dozzle.${DOMAIN}`)"
- "traefik.http.routers.dozzle.entrypoints=websecure"
- "traefik.http.routers.dozzle.tls=true"
- "traefik.http.routers.dozzle.middlewares=authelia@docker"
- "traefik.http.services.dozzle.loadbalancer.server.port=8080"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-dozzle"
@@ -188,22 +186,20 @@ services:
environment:
- GLANCES_OPT=-w
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=infrastructure"
- "homelab.description=System and Docker monitoring"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.glances.rule=Host(`glances.${DOMAIN}`)"
- "traefik.http.routers.glances.entrypoints=websecure"
- "traefik.http.routers.glances.tls=true"
- "traefik.http.routers.glances.middlewares=authelia@docker"
- "traefik.http.services.glances.loadbalancer.server.port=61208"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-glances"
@@ -241,22 +237,20 @@ services:
- PASSWORD=${CODE_SERVER_PASSWORD}
- SUDO_PASSWORD=${CODE_SERVER_SUDO_PASSWORD}
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=infrastructure"
- "homelab.description=VS Code in browser"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.code-server.rule=Host(`code.${DOMAIN}`)"
- "traefik.http.routers.code-server.entrypoints=websecure"
- "traefik.http.routers.code-server.tls.certresolver=letsencrypt"
- "traefik.http.routers.code-server.middlewares=authelia@docker"
- "traefik.http.services.code-server.loadbalancer.server.port=8443"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-code-server"

View File

@@ -56,22 +56,21 @@ services:
# devices:
# - /dev/dri:/dev/dri
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=media"
- "homelab.description=Open-source media streaming server"
# Traefik reverse proxy (uncomment to enable - NO Authelia for app access)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)"
- "traefik.http.routers.jellyfin.entrypoints=websecure"
- "traefik.http.routers.jellyfin.tls=true"
- "traefik.http.routers.jellyfin.tls.certresolver=letsencrypt"
# - "traefik.http.routers.jellyfin.middlewares=authelia@docker" # Disabled for app access
- "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-jellyfin"
@@ -108,21 +107,24 @@ services:
- TZ=${TZ:-America/New_York}
- DOCKER_MODS=linuxserver/mods:universal-calibre
labels:
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# TRAEFIK CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=media"
- "homelab.description=Ebook reader and library management"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.calibre.rule=Host(`calibre.${DOMAIN}`)"
- "traefik.http.routers.calibre.entrypoints=websecure"
- "traefik.http.routers.calibre.tls.certresolver=letsencrypt"
- "traefik.http.routers.calibre.middlewares=authelia@docker"
- "traefik.http.services.calibre.loadbalancer.server.port=8083"
# Sablier lazy loading (disabled by default - uncomment to enable)
# - "sablier.enable=true"
# - "sablier.group=${SERVER_HOSTNAME:-debian}-calibre-web"
# - "sablier.start-on-demand=true"
# ==========================================
# DOCKGE URL CONFIGURATION

View File

@@ -57,22 +57,20 @@ services:
depends_on:
- nextcloud-db
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=File sync and collaboration"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.${DOMAIN}`)"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.tls.certresolver=letsencrypt"
- "traefik.http.routers.nextcloud.middlewares=authelia@docker"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-nextcloud"
@@ -117,14 +115,24 @@ services:
- BASE_URL=https://mealie.${DOMAIN}
- DB_ENGINE=sqlite
labels:
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=Recipe manager and meal planner"
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.mealie.rule=Host(`mealie.${DOMAIN}`)"
- "traefik.http.routers.mealie.entrypoints=websecure"
- "traefik.http.routers.mealie.tls.certresolver=letsencrypt"
# - "traefik.http.routers.mealie.middlewares=authelia@docker" # Disabled for family access
- "traefik.http.services.mealie.loadbalancer.server.port=9000"
# No Authelia - family members should access easily
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-mealie"
- "sablier.start-on-demand=true"
# WordPress - Blog/website platform
# Access at: https://blog.${DOMAIN}
@@ -148,14 +156,24 @@ services:
depends_on:
- wordpress-db
labels:
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=Blog and website platform"
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.wordpress.rule=Host(`wordpress.${DOMAIN}`)"
- "traefik.http.routers.wordpress.entrypoints=websecure"
- "traefik.http.routers.wordpress.tls.certresolver=letsencrypt"
# - "traefik.http.routers.wordpress.middlewares=authelia@docker" # Disabled for public access
- "traefik.http.services.wordpress.loadbalancer.server.port=80"
# No Authelia - public blog
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-wordpress"
- "sablier.start-on-demand=true"
wordpress-db:
restart: unless-stopped
@@ -211,14 +229,24 @@ services:
depends_on:
- gitea-db
labels:
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=Self-hosted Git service"
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`gitea.${DOMAIN}`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=letsencrypt"
- "traefik.http.routers.gitea.middlewares=authelia@docker"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-gitea"
- "sablier.start-on-demand=true"
gitea-db:
restart: unless-stopped
@@ -256,22 +284,20 @@ services:
- PGID=${PGID:-1000}
- TZ=${TZ}
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=File-based wiki"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.dokuwiki.rule=Host(`dokuwiki.${DOMAIN}`)"
- "traefik.http.routers.dokuwiki.entrypoints=websecure"
- "traefik.http.routers.dokuwiki.tls.certresolver=letsencrypt"
- "traefik.http.routers.dokuwiki.middlewares=authelia@docker"
- "traefik.http.services.dokuwiki.loadbalancer.server.port=80"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-dokuwiki"
@@ -305,22 +331,20 @@ services:
depends_on:
- bookstack-db
labels:
# ==========================================
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=Documentation and wiki platform"
# Traefik reverse proxy (uncomment to enable)
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.bookstack.rule=Host(`bookstack.${DOMAIN}`)"
- "traefik.http.routers.bookstack.entrypoints=websecure"
- "traefik.http.routers.bookstack.tls.certresolver=letsencrypt"
- "traefik.http.routers.bookstack.middlewares=authelia@docker"
- "traefik.http.services.bookstack.loadbalancer.server.port=80"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-bookstack"
@@ -367,14 +391,24 @@ services:
depends_on:
- mediawiki-db
labels:
# TRAEFIK & SABLIER CONFIGURATION
# ==========================================
# Service metadata
- "homelab.category=productivity"
- "homelab.description=MediaWiki platform"
# Traefik reverse proxy (comment/uncomment to disable/enable)
# If Traefik is on a remote server: these labels are NOT USED;
# configure external yml files in /traefik/dynamic folder instead.
- "traefik.enable=true"
- "traefik.http.routers.mediawiki.rule=Host(`mediawiki.${DOMAIN}`)"
- "traefik.http.routers.mediawiki.entrypoints=websecure"
- "traefik.http.routers.mediawiki.tls.certresolver=letsencrypt"
- "traefik.http.routers.mediawiki.middlewares=authelia@docker"
- "traefik.http.services.mediawiki.loadbalancer.server.port=80"
# Sablier lazy loading (enabled by default - comment out to disable)
- "sablier.enable=true"
- "sablier.group=${SERVER_HOSTNAME:-debian}-mediawiki"
- "sablier.start-on-demand=true"
mediawiki-db:
restart: unless-stopped