Files
homelabstack/stacks/media/docker-compose.yml
T
ginnoir 7aa95fa00a refactor: pure env_file stack.env convention across all stacks
Every service now reads stack.env via env_file with container-exact var
names — no ${VAR} parse-time interpolation, no Portainer UI env vars
(except stacks/dev, kept on UI-env interpolation as documented exception).

- media: drop PUID/PGID/TZ env lines (env_file covers); resolve ${ROOT}
- foundry: secrets via env_file; FOUNDRY_PATCH_URLS -> CONTAINER_PATCH_URLS
- monitoring: HOMARR_SECRET_ENCRYPTION_KEY -> SECRET_ENCRYPTION_KEY
- notify: FRESHRSS_USER composed in stack.env; TZ via env_file
- owncloud: container-exact OWNCLOUD_*/MYSQL_* keys; runtime $$ healthcheck
- resume/famapp: composites (DATABASE_URL etc.) written out in stack.env
- authentik: container-exact keys; image tag pinned in compose
- notes: couchdb creds via env_file
- remote: gains stack.env (no secrets; convention completeness)
- CLAUDE.md: env convention, valhalla-lab registration-only note, correct
  on-host Portainer working-copy path (/config/portainer/compose/<id>)

Validated with docker compose config on valhalla for all 15 stacks.
2026-06-09 16:03:47 -05:00

197 lines
4.6 KiB
YAML

# media stack — *arr suite, download clients, and media utilities.
# All config/data is bind-mounted to /config and /storage1 already (no named
# volumes to migrate). Services join the private `media` net for inter-app
# traffic (prowlarr<->sonarr/radarr) and `edge` so Caddy can proxy them.
#
# Env convention: every service gets stack.env via env_file; var names there are
# exactly what the containers read (PUID/PGID/TZ), so no ${VAR} interpolation
# and no Portainer UI env vars are needed. Service-specific settings stay in
# per-service environment blocks.
services:
deluge:
container_name: deluge
image: lscr.io/linuxserver/deluge:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
volumes:
- /storage1/torrents:/downloads
- /config/deluge:/config
ports:
- "8112:8112"
nzbget:
container_name: nzbget
image: lscr.io/linuxserver/nzbget:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
volumes:
- /storage1/complete:/downloads
- /config/nzbget:/config
ports:
- "6789:6789"
sonarr:
container_name: sonarr
image: lscr.io/linuxserver/sonarr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
volumes:
- /etc/localtime:/etc/localtime:ro
- /config/sonarr:/config
- /storage1/Media/TV:/tv
- /storage1/Media/Anime:/anime
- /storage1/complete:/downloads
ports:
- "8989:8989"
radarr:
container_name: radarr
image: lscr.io/linuxserver/radarr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
volumes:
- /etc/localtime:/etc/localtime:ro
- /config/radarr:/config
- /storage1/Media/Movies:/movies
- /storage1/complete:/downloads
ports:
- "7878:7878"
bazarr:
container_name: bazarr
image: lscr.io/linuxserver/bazarr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
environment:
- UMASK_SET=022
volumes:
- /config/bazarr:/config
- /storage1/Media/Movies:/movies
- /storage1/Media/TV:/tv
- /storage1/Media/Anime:/anime
ports:
- "6767:6767"
prowlarr:
container_name: prowlarr
image: ghcr.io/hotio/prowlarr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
environment:
- UMASK=002
volumes:
- /config/prowlarr:/config
ports:
- "9696:9696"
overseerr:
container_name: overseerr
image: sctx/overseerr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
environment:
- UMASK=002
volumes:
- /config/overseerr:/app/config
ports:
- "5055:5055"
tautulli:
image: ghcr.io/linuxserver/tautulli:latest
container_name: tautulli
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
volumes:
- /config/tautulli:/config
- /storage1/PMS:/logs
ports:
- "8181:8181"
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
environment:
- WEBUI_PORT=3232
- TORRENTING_PORT=6881
volumes:
- /config/qbittorrent:/config
- /storage1/complete:/downloads
ports:
- "3232:3232"
- "6881:6881"
- "6881:6881/udp"
whisparr:
container_name: whisparr
image: ghcr.io/hotio/whisparr:latest
restart: unless-stopped
networks: [media, edge]
env_file:
- stack.env
environment:
- UMASK=002
- WEBUI_PORTS=6969/tcp
volumes:
- /config/whisparr:/config
- /storage1:/data
ports:
- "6969:6969"
stash:
image: stashapp/stash:latest
container_name: stash
restart: unless-stopped
networks: [media, edge]
logging:
driver: json-file
options:
max-file: "10"
max-size: "2m"
env_file:
- stack.env
environment:
- STASH_STASH=/data/
- STASH_GENERATED=/generated/
- STASH_METADATA=/metadata/
- STASH_CACHE=/cache/
- STASH_PORT=6970
volumes:
- /etc/localtime:/etc/localtime:ro
- /config/stash:/root/.stash
- /storage1/LinuxISOs:/data
- /storage1/stash/metadata:/metadata
- /storage1/stash/cache:/cache
- /storage1/stash/blobs:/blobs
- /storage1/stash/generated:/generated
ports:
- "6971:6970"
networks:
media:
name: media
driver: bridge
edge:
name: edge
external: true