linuxserver / docker-jellyfin

GNU General Public License v3.0
642 stars 97 forks source link

[BUG] JELLYFIN_ Environmental Parameters are Hardcoded #204

Closed GittyBruce closed 1 year ago

GittyBruce commented 1 year ago

Is there an existing issue for this?

Current Behavior

Expect that passing

environment:
  - JELLYFIN_DATA_DIR="/config/data_2" 
  - JELLYFIN_CONFIG_DIR="/config_2" 
  - JELLYFIN_LOG_DIR="/config/log_2" 
  - JELLYFIN_CACHE_DIR="/config/cache_2" 
  - JELLYFIN_WEB_DIR="/usr/share/jellyfin/web_2"

Would set those parameters inside the container. Instead, they are overwritten by root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run to their defaults.

Other environmental parameters such as JELLYFIN_FFmpeg__probesize apply correctly. It's only these hardcoded ones that don't.

Expected Behavior

Env variables are set.

Steps To Reproduce

Run the attached docker-compose segment. Check logs for the env variables.

Environment

No response

CPU architecture

x86-64

Docker creation

Jellyfin:
    image: linuxserver/jellyfin
    container_name: 'jellyfin'
    volumes:
      - $DOCKERDIR/jellyfin:/config
      - /tmp/jellyfin/cache:/cache
      - /tmp/jellyfin/transcodes:/transcodes
      - /tmp/jellyfin/log:/log
      - $DATADIR:/media
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]
    environment:
      - PUID=1000
      - PGID=1000
      - "TZ=America/Los_Angeles"
      - "JELLYFIN_LOG_DIR=/log"
      - JELLYFIN_FFmpeg__probesize=500M
      - JELLYFIN_FFmpeg__analyzeduration=250M

Container logs

2023-07-09 23:58:18.165 +00:00] [INF] [6] Main: Jellyfin version: "10.8.10"
[2023-07-09 23:58:18.183 +00:00] [INF] [6] Main: Environment Variables: ["[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_FFmpeg__probesize, 500M]", "[JELLYFIN_FFmpeg__analyzeduration, 250M]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]"]
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

aptalca commented 1 year ago

Our container was not designed to have those settings user configurable and they are not listed as valid env vars in our readme.

GittyBruce commented 1 year ago

Gotcha. Feel free to close then, though it is odd to override those parameters without documentation, especially since they're Jellyfin parameters and not container parameters. There are certainly several other environmental parameters Jellyfin accepts that aren't listed in the readme.