Update docker-compose files to use configurable environment variables
- Replace hardcoded paths with variables: STACKS_DIR, PROJECTS_DIR, MEDIA_DIR, DOWNLOAD_DIR - Update .env.example with new variable definitions - Remove unused .template files - Enable configurable directory paths for stacks, media, and downloads
This commit is contained in:
@@ -17,12 +17,12 @@ services:
|
||||
- '8989:8989'
|
||||
volumes:
|
||||
- ./sonarr/config:/config
|
||||
- /mnt/media:/media
|
||||
- /mnt/downloads:/downloads # Large downloads on separate drive
|
||||
- ${MEDIA_DIR}:/media
|
||||
- ${DOWNLOADS_DIR}:/downloads # Large downloads on separate drive
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:8989/']
|
||||
interval: 30s
|
||||
@@ -62,12 +62,12 @@ services:
|
||||
- '7878:7878'
|
||||
volumes:
|
||||
- ./radarr/config:/config
|
||||
- /mnt/media:/media
|
||||
- /mnt/downloads:/downloads # Large downloads on separate drive
|
||||
- ${MEDIA_DIR}:/media
|
||||
- ${DOWNLOADS_DIR}:/downloads # Large downloads on separate drive
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:7878/']
|
||||
interval: 30s
|
||||
@@ -109,9 +109,9 @@ services:
|
||||
volumes:
|
||||
- ./prowlarr/config:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:9696/']
|
||||
interval: 30s
|
||||
@@ -151,12 +151,12 @@ services:
|
||||
- '8787:8787'
|
||||
volumes:
|
||||
- ./readarr/config:/config
|
||||
- /mnt/media/books:/books
|
||||
- /mnt/downloads:/downloads
|
||||
- ${MEDIA_DIR}/books:/books
|
||||
- ${DOWNLOADS_DIR}:/downloads
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
@@ -190,12 +190,12 @@ services:
|
||||
- '8686:8686'
|
||||
volumes:
|
||||
- ./lidarr/config:/config
|
||||
- /mnt/media/music:/music
|
||||
- /mnt/downloads:/downloads
|
||||
- ${MEDIA_DIR}/music:/music
|
||||
- ${DOWNLOADS_DIR}:/downloads
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
@@ -229,12 +229,12 @@ services:
|
||||
- '5299:5299'
|
||||
volumes:
|
||||
- ./lazylibrarian/config:/config
|
||||
- /mnt/media/books:/books
|
||||
- /mnt/downloads:/downloads
|
||||
- ${MEDIA_DIR}/books:/books
|
||||
- ${DOWNLOADS_DIR}:/downloads
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
- DOCKER_MODS=linuxserver/mods:lazylibrarian-ffmpeg
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
@@ -269,12 +269,12 @@ services:
|
||||
- '8090:8090'
|
||||
volumes:
|
||||
- ./mylar3/config:/config
|
||||
- /mnt/media/comics:/comics
|
||||
- /mnt/downloads:/downloads
|
||||
- ${MEDIA_DIR}/comics:/comics
|
||||
- ${DOWNLOADS_DIR}:/downloads
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- PUID=${PUID}
|
||||
- PGID=${PUID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
@@ -310,7 +310,7 @@ services:
|
||||
- ./jellyseerr/config:/app/config
|
||||
environment:
|
||||
- LOG_LEVEL=info
|
||||
- TZ=America/New_York
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:5055/']
|
||||
interval: 30s
|
||||
@@ -348,7 +348,7 @@ services:
|
||||
- homelab-network
|
||||
environment:
|
||||
- LOG_LEVEL=info
|
||||
- TZ=America/New_York
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
- homelab.category=media
|
||||
- homelab.description=Cloudflare bypass for indexers
|
||||
|
||||
@@ -1,384 +0,0 @@
|
||||
# Media Management Services
|
||||
# Content automation and library management (*arr apps, transcoders, etc.)
|
||||
# Place in /opt/stacks/media-management/docker-compose.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
|
||||
|
||||
services:
|
||||
# Sonarr - TV show automation
|
||||
# Access at: https://sonarr.yourdomain.duckdns.org
|
||||
sonarr:
|
||||
image: linuxserver/sonarr:4.0.0
|
||||
container_name: sonarr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "8989:8989"
|
||||
volumes:
|
||||
- ./sonarr/config:/config
|
||||
- /mnt/media:/media
|
||||
- /mnt/downloads:/downloads # Large downloads on separate drive
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8989/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=TV show management and automation"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.sonarr.rule=Host(`sonarr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.sonarr.entrypoints=websecure"
|
||||
- "traefik.http.routers.sonarr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.sonarr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.sonarr.loadbalancer.server.port=8989"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Radarr - Movie automation
|
||||
# Access at: https://radarr.yourdomain.duckdns.org
|
||||
radarr:
|
||||
image: linuxserver/radarr:5.2.6
|
||||
container_name: radarr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "7878:7878"
|
||||
volumes:
|
||||
- ./radarr/config:/config
|
||||
- /mnt/media:/media
|
||||
- /mnt/downloads:/downloads # Large downloads on separate drive
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:7878/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Movie management and automation"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.radarr.rule=Host(`radarr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.radarr.entrypoints=websecure"
|
||||
- "traefik.http.routers.radarr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.radarr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.radarr.loadbalancer.server.port=7878"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Prowlarr - Indexer manager
|
||||
# Access at: https://prowlarr.yourdomain.duckdns.org
|
||||
prowlarr:
|
||||
image: linuxserver/prowlarr:1.11.4
|
||||
container_name: prowlarr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "9696:9696"
|
||||
volumes:
|
||||
- ./prowlarr/config:/config
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9696/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Indexer manager for Sonarr/Radarr"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.prowlarr.rule=Host(`prowlarr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.prowlarr.entrypoints=websecure"
|
||||
- "traefik.http.routers.prowlarr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.prowlarr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.prowlarr.loadbalancer.server.port=9696"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Readarr - Ebook and audiobook management
|
||||
# Access at: https://readarr.${DOMAIN}
|
||||
readarr:
|
||||
image: linuxserver/readarr:0.4.19-nightly
|
||||
container_name: readarr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "8787:8787"
|
||||
volumes:
|
||||
- ./readarr/config:/config
|
||||
- /mnt/media/books:/books
|
||||
- /mnt/downloads:/downloads
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Ebook and audiobook management"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.readarr.rule=Host(`readarr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.readarr.entrypoints=websecure"
|
||||
- "traefik.http.routers.readarr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.readarr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.readarr.loadbalancer.server.port=8787"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Lidarr - Music collection manager
|
||||
# Access at: https://lidarr.${DOMAIN}
|
||||
lidarr:
|
||||
image: linuxserver/lidarr:2.0.7
|
||||
container_name: lidarr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "8686:8686"
|
||||
volumes:
|
||||
- ./lidarr/config:/config
|
||||
- /mnt/media/music:/music
|
||||
- /mnt/downloads:/downloads
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Music collection manager"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.lidarr.rule=Host(`lidarr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.lidarr.entrypoints=websecure"
|
||||
- "traefik.http.routers.lidarr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.lidarr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.lidarr.loadbalancer.server.port=8686"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Lazy Librarian - Book manager
|
||||
# Access at: https://lazylibrarian.${DOMAIN}
|
||||
lazylibrarian:
|
||||
image: linuxserver/lazylibrarian:latest
|
||||
container_name: lazylibrarian
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "5299:5299"
|
||||
volumes:
|
||||
- ./lazylibrarian/config:/config
|
||||
- /mnt/media/books:/books
|
||||
- /mnt/downloads:/downloads
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DOCKER_MODS=linuxserver/mods:lazylibrarian-ffmpeg
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Book download automation"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.lazylibrarian.rule=Host(`lazylibrarian.${DOMAIN}`)"
|
||||
- "traefik.http.routers.lazylibrarian.entrypoints=websecure"
|
||||
- "traefik.http.routers.lazylibrarian.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.lazylibrarian.middlewares=authelia@docker"
|
||||
- "traefik.http.services.lazylibrarian.loadbalancer.server.port=5299"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Mylar3 - Comic book manager
|
||||
# Access at: https://mylar.${DOMAIN}
|
||||
mylar3:
|
||||
image: linuxserver/mylar3:latest
|
||||
container_name: mylar3
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "8090:8090"
|
||||
volumes:
|
||||
- ./mylar3/config:/config
|
||||
- /mnt/media/comics:/comics
|
||||
- /mnt/downloads:/downloads
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Comic book collection manager"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.mylar.rule=Host(`mylar.${DOMAIN}`)"
|
||||
- "traefik.http.routers.mylar.entrypoints=websecure"
|
||||
- "traefik.http.routers.mylar.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.mylar.middlewares=authelia@docker"
|
||||
- "traefik.http.services.mylar.loadbalancer.server.port=8090"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# Jellyseerr - Request management for Jellyfin/Plex
|
||||
# Access at: https://jellyseerr.${DOMAIN}
|
||||
jellyseerr:
|
||||
image: fallenbagel/jellyseerr:latest
|
||||
container_name: jellyseerr
|
||||
restart: no
|
||||
networks:
|
||||
- homelab-network
|
||||
- traefik-network
|
||||
ports:
|
||||
- "5055:5055"
|
||||
volumes:
|
||||
- ./jellyseerr/config:/app/config
|
||||
environment:
|
||||
- LOG_LEVEL=info
|
||||
- TZ=${TZ}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5055/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
labels:
|
||||
# TRAEFIK CONFIGURATION
|
||||
# ==========================================
|
||||
# Service metadata
|
||||
- "homelab.category=media"
|
||||
- "homelab.description=Media request management"
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
# 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.jellyseerr.rule=Host(`jellyseerr.${DOMAIN}`)"
|
||||
- "traefik.http.routers.jellyseerr.entrypoints=websecure"
|
||||
- "traefik.http.routers.jellyseerr.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.jellyseerr.middlewares=authelia@docker"
|
||||
- "traefik.http.services.jellyseerr.loadbalancer.server.port=5055"
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
# FlareSolverr - Cloudflare bypass for Prowlarr
|
||||
# No web UI - used by Prowlarr
|
||||
flaresolverr:
|
||||
image: flaresolverr/flaresolverr:latest
|
||||
container_name: flaresolverr
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- homelab-network
|
||||
environment:
|
||||
- LOG_LEVEL=info
|
||||
- TZ=${TZ}
|
||||
labels:
|
||||
- homelab.category=media
|
||||
- homelab.description=Cloudflare bypass for indexers
|
||||
- "sablier.enable=true"
|
||||
- "sablier.group=${SERVER_HOSTNAME}-arr"
|
||||
- "sablier.start-on-demand=true"
|
||||
|
||||
x-dockge:
|
||||
urls:
|
||||
- https://sonarr.${DOMAIN}
|
||||
- http://${SERVER_IP}:8989
|
||||
- https://radarr.${DOMAIN}
|
||||
- http://${SERVER_IP}:7878
|
||||
- https://prowlarr.${DOMAIN}
|
||||
- http://${SERVER_IP}:9696
|
||||
- https://readarr.${DOMAIN}
|
||||
- http://${SERVER_IP}:8787
|
||||
- https://lidarr.${DOMAIN}
|
||||
- http://${SERVER_IP}:8686
|
||||
- https://lazylibrarian.${DOMAIN}
|
||||
- http://${SERVER_IP}:5299
|
||||
- https://mylar.${DOMAIN}
|
||||
- http://${SERVER_IP}:8090
|
||||
- https://jellyseerr.${DOMAIN}
|
||||
- http://${SERVER_IP}:5055
|
||||
|
||||
networks:
|
||||
homelab-network:
|
||||
external: true
|
||||
traefik-network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user