# Seans — the installation stack (D138; install guide: docs/install.md). # # This is the file a release ships as `compose.release.yaml`. The release job fills in the empty default of every # `${_IMAGE:-}` with the image of the release by digest (ci/release-compose.sh) and changes nothing else. # Save it as `compose.yaml` in an empty directory, put an `.env` beside it (template: .env.example of the release) # and run `docker compose up -d`. Nothing here names a host: every value that depends on the machine is a variable # of `.env`, and every secret is a file you provide. # # Services. `seans` always runs. Everything else is opt-in by Compose profile (`COMPOSE_PROFILES` in `.env`, # comma-separated): # postgres Postgres for Seans's database (SQLite is the default) # updater seans-updater and its Docker socket proxy (ADM-8, D119, D124) # jellyfin the bundled media engine gocoder the bundled adaptive transcoder (and its database) # seerr the bundled request service radarr, sonarr, lidarr, prowlarr, qbittorrent # gpu the GPU probe sidecar (D66) # # Data. Each location is its own named volume, or a host path when the variable holds one (a value with a `/`): # the database and the secrets key, the backups, the transcode cache, the image cache and the prepared offline # files never share a directory (D22). Put the backups on another disk (SEANS_BACKUPS_VOLUME). A host path must be # writable by the image's user, 65532 (`chown -R 65532:65532 `). Nothing here is a tmpfs. name: seans x-logging: &logging logging: driver: json-file options: max-size: 10m max-file: "3" x-hardened: &hardened cap_drop: - ALL security_opt: - no-new-privileges:true # The *arr services and qBittorrent: linuxserver.io-style images (configuration in /config, PUID and PGID). # They see the whole media root at /data, so a finished download is hard-linked into the library instead of # copied. That mount is shared with the other services of the group, so their pre-update copy (D128) leaves it out. x-arr: &arr <<: *logging restart: unless-stopped environment: &arr-env PUID: ${SEANS_MEDIA_UID:-1000} PGID: ${SEANS_MEDIA_GID:-1000} TZ: ${SEANS_TIME_ZONE:-UTC} labels: seans.updater.backup.skip: /data services: seans: image: ${SEANS_IMAGE:-gitea.sky-apps.uk/lastskywalker/seans@sha256:d659b92bc185d506cef0c7d56f705c86cb3c49bfa8fc42872c9a48cbffa95cbc} <<: [*logging, *hardened] restart: unless-stopped init: true stop_grace_period: 40s ports: # Loopback by default: put a TLS reverse proxy in front (docs/install.md). 0.0.0.0 serves every interface. - "${SEANS_BIND_ADDRESS:-127.0.0.1}:${SEANS_PORT:-8080}:8080" # Every other server setting (docs/configuration.md): one `SEANS_=` per line in seans.env. env_file: - path: seans.env required: false environment: SEANS_PUBLIC_URL: ${SEANS_PUBLIC_URL:-} SEANS_TRUSTED_PROXIES: ${SEANS_TRUSTED_PROXIES:-} SEANS_LOG_FORMAT: ${SEANS_LOG_FORMAT:-json} SEANS_LOG_LEVEL: ${SEANS_LOG_LEVEL:-info} # One source for the maintenance window's zone: the page shows the window in it and the updater runs it in it. SEANS_TIME_ZONE: ${SEANS_TIME_ZONE:-UTC} SEANS_DATA_DIR: /data SEANS_STORAGE_BACKUPS_PATH: /backups SEANS_STORAGE_TRANSCODE_PATH: /cache/transcode SEANS_STORAGE_IMAGES_PATH: /cache/images SEANS_STORAGE_OFFLINE_PATH: /offline SEANS_STORAGE_TRANSCODE_CAP: ${SEANS_TRANSCODE_CAP:-0} SEANS_STORAGE_IMAGES_CAP: ${SEANS_IMAGES_CAP:-4GiB} SEANS_STORAGE_OFFLINE_CAP: ${SEANS_OFFLINE_CAP:-200GiB} SEANS_STORAGE_BACKUPS_CAP: ${SEANS_BACKUPS_CAP:-0} # The secrets key: the file of SEANS_SECRET_KEY_FILE when one is given; empty (the default) means # /secret.key, created on first start. SEANS_SECRETS_KEY_FILE: /run/secrets/secret_key SEANS_DATABASE_DRIVER: ${SEANS_DATABASE_DRIVER:-sqlite} SEANS_DATABASE_URL: ${SEANS_DATABASE_URL:-} # The release this image is: the release's Compose file carries its version as the default (D150). Seans reports # it until the updater has resolved the running image's release from the signed manifest; empty means a # development build when no updater says otherwise. SEANS_RELEASE_VERSION: ${SEANS_RELEASE_VERSION:-1.2.2} # Empty (the default) means no updater: the Updates page shows versions and compatibility only. SEANS_UPDATER_URL: ${SEANS_UPDATER_URL:-} SEANS_UPDATER_TOKEN_FILE: /run/secrets/updater_token # Where the bundled companions answer; used only for a service the setup wizard marks as bundled. SEANS_ENGINE_URL: http://jellyfin:8096 SEANS_GOCODER_URL: http://gocoder:7666/video # Jellyfin sees the library at /media, Gocoder at /video. SEANS_GOCODER_PATH_MAP: ${SEANS_GOCODER_PATH_MAP:-/media=/video} SEANS_REQUESTS_URL: http://seerr:5055 SEANS_RADARR_URL: http://radarr:7878 SEANS_SONARR_URL: http://sonarr:8989 SEANS_LIDARR_URL: http://lidarr:8686 SEANS_PROWLARR_URL: http://prowlarr:9696 SEANS_DOWNLOADS_URL: http://qbittorrent:8080 SEANS_HWACCEL_GPU_PROBE_URL: ${SEANS_GPU_PROBE_URL:-} volumes: - ${SEANS_DATA_VOLUME:-seans-data}:/data - ${SEANS_BACKUPS_VOLUME:-seans-backups}:/backups - ${SEANS_TRANSCODE_VOLUME:-seans-transcode}:/cache/transcode - ${SEANS_IMAGES_VOLUME:-seans-images}:/cache/images - ${SEANS_OFFLINE_VOLUME:-seans-offline}:/offline # The library read-only at the path the bundled engine sees it: offline encodes and intro detection read it. - ${SEANS_LIBRARY_DIR:-seans-library}:/media:ro secrets: - secret_key - updater_token networks: - default - updater depends_on: postgres: condition: service_healthy required: false postgres: profiles: [postgres] image: ${SEANS_POSTGRES_IMAGE:-docker.io/library/postgres:18.7-alpine@sha256:b6972e1115a4ff8eba5d7f7d19184926d1e16d7d1136ae1e1a7ebf286da0f015} <<: *logging restart: unless-stopped environment: POSTGRES_USER: seans POSTGRES_DB: seans POSTGRES_PASSWORD: ${SEANS_POSTGRES_PASSWORD:-} volumes: - ${SEANS_POSTGRES_VOLUME:-seans-postgres}:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U seans -d seans"] interval: 5s timeout: 3s retries: 20 # Networks of the updater. `updater` is internal and holds the command API between `seans` and `seans-updater`; # `updater-docker` is internal and holds the proxy's API between `seans-updater` and `updater-proxy`; # `updater-egress` is the only one with a route out, and only the updater is on it (it reads the release feed # and pulls images through the proxy's daemon). No port is published: the command API answers the private ranges # of its own networks only, and the shared token is the control (D119). The proxy is the only service with the # Docker socket, and it gets the socket's group, never root. seans-updater: profiles: [updater] image: ${SEANS_UPDATER_IMAGE:-gitea.sky-apps.uk/lastskywalker/seans-updater@sha256:ac4fe3a9ceb9e870e1eae57ea39185badfaa6843fa6969d47bbd2a2ca519878a} <<: [*logging, *hardened] restart: unless-stopped environment: SEANS_UPDATER_LISTEN: ":8090" SEANS_UPDATER_TOKEN_FILE: /run/secrets/updater_token SEANS_UPDATER_PROXY_URL: http://updater-proxy:2375 SEANS_UPDATER_PROXY_TOKEN_FILE: /run/secrets/proxy_token SEANS_UPDATER_FEED: ${SEANS_UPDATER_FEED:-} # The registry login of a private feed: the user from .env, the password from the file of # SEANS_UPDATER_FEED_PASSWORD_FILE when one is given; empty (the default) means an anonymous feed. SEANS_UPDATER_FEED_USER: ${SEANS_UPDATER_FEED_USER:-} SEANS_UPDATER_FEED_PASSWORD_FILE: /run/secrets/feed_password SEANS_UPDATER_TRUST_KEY_FILE: /run/secrets/updater_trust_key TZ: ${SEANS_TIME_ZONE:-UTC} networks: - updater - updater-docker - updater-egress volumes: # The updater's own state: never the Seans database, which a rollback restores. - updater-state:/var/lib/seans-updater secrets: - updater_token - proxy_token - updater_trust_key - feed_password read_only: true depends_on: updater-state-init: condition: service_completed_successfully updater-proxy: condition: service_healthy # Runs once before the updater and gives the state volume to the updater's user (D144). A new named volume is # owned by root unless the Docker daemon copies the image directory's owner into it, which not every daemon does, # and a host path belongs to whoever made it; so the stack never relies on either. It is the only service that # runs as root: with CHOWN and DAC_READ_SEARCH only (the second to walk a directory it does not own), an empty read-only filesystem and no network, then it exits. updater-state-init: profiles: [updater] image: ${SEANS_UPDATER_IMAGE:-gitea.sky-apps.uk/lastskywalker/seans-updater@sha256:ac4fe3a9ceb9e870e1eae57ea39185badfaa6843fa6969d47bbd2a2ca519878a} <<: *logging restart: "no" user: "0:0" entrypoint: ["/usr/local/bin/seans-updater"] command: ["-prepare-state"] cap_drop: - ALL cap_add: - CHOWN - DAC_READ_SEARCH security_opt: - no-new-privileges:true read_only: true network_mode: none volumes: - updater-state:/var/lib/seans-updater updater-proxy: profiles: [updater] image: ${SEANS_UPDATER_PROXY_IMAGE:-gitea.sky-apps.uk/lastskywalker/seans-updater-proxy@sha256:2c0754bcc0846c3842b7c95e98e9977952476c55ad47099187704d93f29bb2be} <<: [*logging, *hardened] restart: unless-stopped environment: # The proxy touches the containers and volumes of this Compose project only. SEANS_PROXY_PROJECT: ${COMPOSE_PROJECT_NAME} SEANS_PROXY_TOKEN_FILE: /run/secrets/proxy_token SEANS_PROXY_LISTEN: ":2375" SEANS_PROXY_SOCKET: /var/run/docker.sock # The proxy verifies its own replacement's signature with this key (D130); without it, it is never replaced. SEANS_PROXY_TRUST_KEY_FILE: /run/secrets/updater_trust_key # The signature channel of the images it takes (D139): release, or stage for a stage or bench stack. SEANS_PROXY_CHANNEL: ${SEANS_PROXY_CHANNEL:-release} networks: - updater-docker volumes: - ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock # The socket's group, not root: the image runs as the nonroot user. group_add: - ${DOCKER_GID:-} secrets: - proxy_token - updater_trust_key read_only: true # Started after seans, not after it is healthy: the seans image has no health check, so that would never hold. depends_on: seans: condition: service_started jellyfin: profiles: [jellyfin] image: ${JELLYFIN_IMAGE:-docker.io/jellyfin/jellyfin@sha256:fea863d0cd9ec445985d9c75fc6ed64e38a1d2766cf0c250a33d553f4fc1b771} <<: *logging restart: unless-stopped volumes: - jellyfin-config:/config - jellyfin-cache:/cache - ${SEANS_LIBRARY_DIR:-seans-library}:/media:ro healthcheck: test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8096/health | grep -qx Healthy"] interval: 10s timeout: 3s retries: 30 # Gocoder's database is part of the gocoder unit: stopped, copied and restored with it (D128). gocoder-db: profiles: [gocoder] image: ${SEANS_POSTGRES_IMAGE:-docker.io/library/postgres:18.7-alpine@sha256:b6972e1115a4ff8eba5d7f7d19184926d1e16d7d1136ae1e1a7ebf286da0f015} <<: *logging restart: unless-stopped labels: seans.updater.unit: gocoder environment: POSTGRES_USER: gocoder POSTGRES_DB: gocoder POSTGRES_PASSWORD: ${SEANS_GOCODER_DB_PASSWORD:-} volumes: - gocoder-db:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U gocoder -d gocoder"] interval: 5s timeout: 3s retries: 20 gocoder: profiles: [gocoder] image: ${GOCODER_IMAGE:-ghcr.io/zoriya/kyoo_transcoder@sha256:1171f5001e10a082db3da7e12f4b9ac958feb1e51d9a4a62a392c50a3e2fab4b} <<: *logging restart: unless-stopped depends_on: gocoder-db: condition: service_healthy environment: GOCODER_SAFE_PATH: /video GOCODER_CACHE_ROOT: /cache GOCODER_METADATA_ROOT: /metadata GOCODER_HWACCEL: ${SEANS_GOCODER_HWACCEL:-} GOCODER_PRESET: fast POSTGRES_URL: postgres://gocoder:${SEANS_GOCODER_DB_PASSWORD:-}@gocoder-db:5432/gocoder?sslmode=disable volumes: - ${SEANS_LIBRARY_DIR:-seans-library}:/video:ro - gocoder-cache:/cache - gocoder-metadata:/metadata seerr: profiles: [seerr] image: ${SEERR_IMAGE:-ghcr.io/seerr-team/seerr@sha256:aadee014b40e28cf9aa4928bc9d1183a6eb08f8c44d543cddc9efdcb16549be2} <<: *logging restart: unless-stopped init: true environment: TZ: ${SEANS_TIME_ZONE:-UTC} volumes: - seerr-config:/app/config radarr: profiles: [radarr] image: ${RADARR_IMAGE:-lscr.io/linuxserver/radarr@sha256:044788f5508b7f67a3e0368cdd142c77c4d4cd5aec2efaba53e1a68b6b6231e7} <<: *arr volumes: - radarr-config:/config - ${SEANS_MEDIA_ROOT:-seans-media}:/data sonarr: profiles: [sonarr] image: ${SONARR_IMAGE:-lscr.io/linuxserver/sonarr@sha256:339814bbf50599ac3b59077c252f29833d0138b59a062d0e82ce37bdc7f04f86} <<: *arr volumes: - sonarr-config:/config - ${SEANS_MEDIA_ROOT:-seans-media}:/data lidarr: profiles: [lidarr] image: ${LIDARR_IMAGE:-lscr.io/linuxserver/lidarr@sha256:8fb40ada166dd1880cb1b166df5bcbb081107523f20ab60df05c313e2052a467} <<: *arr volumes: - lidarr-config:/config - ${SEANS_MEDIA_ROOT:-seans-media}:/data prowlarr: profiles: [prowlarr] image: ${PROWLARR_IMAGE:-lscr.io/linuxserver/prowlarr@sha256:45117ba8439e2337a92ffe38a451a4dafc0be771754d05d88cdf102419d09646} <<: *logging restart: unless-stopped environment: *arr-env volumes: - prowlarr-config:/config qbittorrent: profiles: [qbittorrent] image: ${QBITTORRENT_IMAGE:-lscr.io/linuxserver/qbittorrent@sha256:3d4c4545d51a690a0df15a2ff99038823a88a9822df8e794526447b9afbd7384} <<: *arr environment: <<: *arr-env WEBUI_PORT: "8080" volumes: - qbittorrent-config:/config - ${SEANS_MEDIA_ROOT:-seans-media}:/data # GPU probe sidecar (docs/architecture.md §9, D66): set SEANS_GPU_PROBE_URL=http://seans-gpu-probe:8099 with # this profile. It reads the GPU through perf_event_open, which needs CAP_PERFMON and no device node; it runs # as the image's non-root user, whose binary's file capability turns the PERFMON granted here into a permitted # one, which is why no-new-privileges stays off for this service. seans-gpu-probe: profiles: [gpu] image: ${SEANS_GPU_PROBE_IMAGE:-gitea.sky-apps.uk/lastskywalker/seans-gpu-probe@sha256:557d55f89ca60a35fbcc860e79f9c9ab6717d9d62129899fabbc0b77128aac43} <<: *logging restart: unless-stopped cap_drop: - ALL cap_add: - PERFMON networks: default: {} updater: internal: true updater-docker: internal: true updater-egress: {} volumes: seans-data: {} seans-backups: {} seans-transcode: {} seans-images: {} seans-offline: {} seans-postgres: {} # Empty until SEANS_LIBRARY_DIR and SEANS_MEDIA_ROOT name the host folders: no host path is created by default. seans-library: {} seans-media: {} updater-state: {} jellyfin-config: {} jellyfin-cache: {} gocoder-db: {} gocoder-cache: {} gocoder-metadata: {} seerr-config: {} radarr-config: {} sonarr-config: {} lidarr-config: {} prowlarr-config: {} qbittorrent-config: {} # A secret without a file is /dev/null: the setting it carries stays empty. secrets: secret_key: file: ${SEANS_SECRET_KEY_FILE:-/dev/null} updater_token: file: ${SEANS_UPDATER_TOKEN_FILE:-/dev/null} proxy_token: file: ${SEANS_PROXY_TOKEN_FILE:-/dev/null} updater_trust_key: file: ${SEANS_UPDATER_TRUST_KEY_FILE:-/dev/null} feed_password: file: ${SEANS_UPDATER_FEED_PASSWORD_FILE:-/dev/null}