Unpackerr/unpackerr

ENV variables do not override default settings

thepaulz opened this issue · 5 comments

I am running unpackerr with docker-compose and with the following configuration:

  unpackerr:
    image: golift/unpackerr
    container_name: unpackerr
    hostname: unpackerr
    volumes:
      - /var/mnt/media:/data
      - /var/mnt/data/unpackerr/config:/config
    restart: unless-stopped
    user: pid:gid
    environment:
      - TZ=America/Vancouver
      - UN_PARALLEL=5
      - UN_LOG_FILE=/config/unpackerr.log
      - UN_SONARR_0_URL=http://sonarr:8989
      - UN_SONARR_0_API_KEY=xxxxx
      - UN_SONARR_0_PATHS_0=/data
      - UN_SONARR_0_SYNCTHING=true
      - UN_RADARR_0_URL=http://radarr:8310
      - UN_RADARR_0_API_KEY=xxxxx
      - UN_RADARR_0_PATHS_0=/data
      - UN_RADARR_0_SYNCTHING=true
    networks:
      - network

When starting the container, the following log lines are displayed:

[INFO] 2024/07/22 08:45:57 Unpackerr v0.14.0-716 Starting! PID: 1, UID: 1000, GID: 1000, Umask: 18, Now: 2024-07-22 08:45:58 -0700 PDT
[INFO] 2024/07/22 08:45:57 ==> GoLift Discord: https://golift.io/discord <==
[INFO] 2024/07/22 08:45:57 ==> Startup Settings <==
[INFO] 2024/07/22 08:45:57  => Using Config File: /config/unpackerr.conf, age: 3 days 20 hours 17 mins
[INFO] 2024/07/22 08:45:57  => Sonarr Config: 1 server: http://sonarr:8989, apikey:true, timeout:10s, verify ssl:false, protos:torrent, syncthing: false, delete_orig: false, delete_delay: 5m0s, paths:["/downloads"]
[INFO] 2024/07/22 08:45:57  => Radarr Config: 1 server: http://radarr:8310, apikey:true, timeout:10s, verify ssl:false, protos:torrent, syncthing: false, delete_orig: false, delete_delay: 5m0s, paths:["/downloads"]
[INFO] 2024/07/22 08:45:57  => Lidarr Config: 0 servers
[INFO] 2024/07/22 08:45:57  => Readarr Config: 0 servers
[INFO] 2024/07/22 08:45:57  => Folder Config: 0 paths, event buffer: 20000
[INFO] 2024/07/22 08:45:57  => Parallel: 5
[INFO] 2024/07/22 08:45:57  => Passwords: 0 (rar/7z)
[INFO] 2024/07/22 08:45:57  => Interval: 2m
[INFO] 2024/07/22 08:45:57  => Start/Delete Delay: 1m/5m
[INFO] 2024/07/22 08:45:57  => Retry Delay: 5m, max: 3
[INFO] 2024/07/22 08:45:57  => GUI / StdErr: false / false
[INFO] 2024/07/22 08:45:57  => Debug / Quiet: false / false
[INFO] 2024/07/22 08:45:57  => Activity / Queues: false / 1m
[INFO] 2024/07/22 08:45:57  => Directory & File Modes: 0755 & 0644
[INFO] 2024/07/22 08:45:57  => Log File: /config/unpackerr.log (10 @ 10Mb)
[INFO] 2024/07/22 08:45:57  => Webhook Configs: 0 URLs
[INFO] 2024/07/22 08:45:57  => Command Hook Configs: 0 commands
[INFO] 2024/07/22 08:45:57  => Webserver Disabled
[INFO] 2024/07/22 08:45:57 [Sonarr] Updated (http://sonarr:8989): 0 Items Queued, 0 Retrieved
[INFO] 2024/07/22 08:46:02 [Radarr] Updated (http://radarr:8310): 0 Items Queued, 0 Retrieved

Based on the log, it does not appear the docker environment variables are overwriting the default configuration. While /config/unpackerr.conf exists, the file has not been edited and contains only the default commented-out settings.

Wondering if anyone knows what the cause is. Unpackerr appears to work correctly even though the reported path for both sonarr and radarr are wrong.

I'm not able to reproduce this. How are you starting the container?

david@gatekeeper:~/l$ docker-compose up
Creating network "l_default" with the default driver
Creating unpackerr ... done
Attaching to unpackerr
unpackerr    | [INFO] 2024/07/22 09:41:10 Unpackerr v0.14.0-716 Starting! PID: 1, UID: 1000, GID: 1000, Umask: 18, Now: 2024-07-22 09:41:10 -0700 PDT
unpackerr    | [INFO] 2024/07/22 09:41:10 ==> GoLift Discord: https://golift.io/discord <==
unpackerr    | [INFO] 2024/07/22 09:41:10 ==> Startup Settings <==
unpackerr    | [INFO] 2024/07/22 09:41:10  => Using Config File: /config/unpackerr.conf, age: 1 min 5 secs 20 ms
unpackerr    | [INFO] 2024/07/22 09:41:10  => Sonarr Config: 1 server: http://sonarr:8989, apikey:true, timeout:10s, verify ssl:false, protos:torrent, syncthing: true, delete_orig: false, delete_delay: 5m0s, paths:["/data"]
unpackerr    | [INFO] 2024/07/22 09:41:10  => Radarr Config: 1 server: http://radarr:8310, apikey:true, timeout:10s, verify ssl:false, protos:torrent, syncthing: true, delete_orig: false, delete_delay: 5m0s, paths:["/data"]
unpackerr    | [INFO] 2024/07/22 09:41:10  => Lidarr Config: 0 servers
unpackerr    | [INFO] 2024/07/22 09:41:10  => Readarr Config: 0 servers
unpackerr    | [INFO] 2024/07/22 09:41:10  => Folder Config: 0 paths, event buffer: 20000
unpackerr    | [INFO] 2024/07/22 09:41:10  => Parallel: 5
unpackerr    | [INFO] 2024/07/22 09:41:10  => Passwords: 0 (rar/7z)
unpackerr    | [INFO] 2024/07/22 09:41:10  => Interval: 2m
unpackerr    | [INFO] 2024/07/22 09:41:10  => Start/Delete Delay: 1m/5m
unpackerr    | [INFO] 2024/07/22 09:41:10  => Retry Delay: 5m, max: 3
unpackerr    | [INFO] 2024/07/22 09:41:10  => GUI / StdErr: false / false
unpackerr    | [INFO] 2024/07/22 09:41:10  => Debug / Quiet: false / false
unpackerr    | [INFO] 2024/07/22 09:41:10  => Activity / Queues: false / 1m
unpackerr    | [INFO] 2024/07/22 09:41:10  => Directory & File Modes: 0755 & 0644
unpackerr    | [INFO] 2024/07/22 09:41:10  => Log File: /config/unpackerr.log (10 @ 10Mb)
unpackerr    | [INFO] 2024/07/22 09:41:10  => Webhook Configs: 0 URLs
unpackerr    | [INFO] 2024/07/22 09:41:10  => Command Hook Configs: 0 commands
unpackerr    | [INFO] 2024/07/22 09:41:10  => Webserver Disabled
unpackerr    | [ERROR] 2024/07/22 09:41:10 Sonarr (http://sonarr:8989): api.Get(v3/queue): httpClient.Do(req): Get "http://sonarr:8989/api/v3/queue?includeUnknownSeriesItems=true&page=1&pageSize=500&sortDirection=ascending&sortKey=timeleft": dial tcp: lookup sonarr on 127.0.0.11:53: no such host
unpackerr    | [ERROR] 2024/07/22 09:41:10 Radarr (http://radarr:8310): api.Get(queue): httpClient.Do(req): Get "http://radarr:8310/api/v3/queue?includeUnknownMovieItems=true&page=1&pageSize=500&sortDirection=ascending&sortKey=timeleft": dial tcp: lookup radarr on 127.0.0.11:53: no such host
^CGracefully stopping... (press Ctrl+C again to force)
Stopping unpackerr ... done
david@gatekeeper:~/l$ cat docker-compose.yml
services:
  unpackerr:
    image: golift/unpackerr
    container_name: unpackerr
    hostname: unpackerr
    volumes:
      - /tmp:/config
    restart: unless-stopped
    user: 1000:1000
    environment:
      - TZ=America/Vancouver
      - UN_PARALLEL=5
      - UN_LOG_FILE=/config/unpackerr.log
      - UN_SONARR_0_URL=http://sonarr:8989
      - UN_SONARR_0_API_KEY=01234567890123456789012345678901
      - UN_SONARR_0_PATHS_0=/data
      - UN_SONARR_0_SYNCTHING=true
      - UN_RADARR_0_URL=http://radarr:8310
      - UN_RADARR_0_API_KEY=01234567890123456789012345678901
      - UN_RADARR_0_PATHS_0=/data
      - UN_RADARR_0_SYNCTHING=true

Strange. I am starting the container with docker-compose up -d. I'll try troubleshooting further on my end.

I just copied your compose to a fresh file, edited the volumes, user, keys and paths. Started it, and it wrote a new default config file to /config. The env variables were used. Restart it and they're still used. Try moving to a fresh folder/file and see if it works.

Were you able to figure this out?

Let me know if you figure out how to reproduce this.