Skip to content

KRAUTWATCH_DOWNLOADS is absent from the generated env.example, so downloads land somewhere Sonarr cannot see #83

Description

@ChrisonSimtian

Usage Information

Krautwatch v0.1.1, deployed from the released docker-compose.yaml + env.example. Any host OS.

Description

KRAUTWATCH_DOWNLOADS decides where downloaded media lands on the host, and it is the setting the README
calls "the one setting that matters". It is not present in the generated env.example.

An operator who fills in env.example — the documented install path — therefore never sets it, and the
downloader silently writes into ./downloads relative to the compose file. Sonarr, mounted somewhere
sensible, never sees the files, and the failure surfaces much later as "No files found are eligible for
import"
with nothing obviously wrong.

The variable is honoured; it is only missing from the file that tells operators it exists.

Reproduction Steps

  1. Download docker-compose.yaml and env.example from the v0.1.1 release.
  2. mv env.example .env and fill in every key present.
  3. docker compose up -d, then grab something through Sonarr.
  4. The file is written inside the agent-downloader container at /downloads, bound to ./downloads
    next to the compose file — not to any media library.
$ grep -c KRAUTWATCH_DOWNLOADS env.example
0
$ grep KRAUTWATCH_DOWNLOADS docker-compose.yaml
        source: "${KRAUTWATCH_DOWNLOADS:-./downloads}"

Expected Behavior

env.example lists KRAUTWATCH_DOWNLOADS like every other operator-supplied value, ideally with a
comment saying it must match the path mounted into Sonarr.

Actual Behavior

Absent, and its :-./downloads default means the mistake is silent rather than a startup failure.

Regression?

No — present since compose publishing landed in #24.

Known Workarounds

Add the line by hand:

KRAUTWATCH_DOWNLOADS=/mnt/media/downloads

Documented as a warning in the self-hosting guide.

Notes

Root cause is in src/Presentation/AppHost/Program.cs:110. The bind source is a raw interpolation
string
:

service.Volumes.Add(new()
{
    Name = "downloads",
    Type = "bind",
    Source = "${KRAUTWATCH_DOWNLOADS:-./downloads}",
    Target = "/downloads",
});

env.example is generated from Aspire's declared parameters — which is why POSTGRES_PASSWORD,
KRAUTWATCH_APIKEY and TVDB_APIKEY appear (they are builder.AddParameter(...) calls) and this one
does not. Declaring it as a parameter and referencing that, rather than hand-writing the interpolation,
should make it appear like the others.

Worth considering whether the :-./downloads fallback should stay at all: failing to start is arguably
kinder than writing media somewhere the operator will not find it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions