Skip to content

bug(host-agent): --no-deps prevents sidecar services from starting on extension install #451

@yasinBursali

Description

@yasinBursali

Summary

When installing an extension via the dashboard, dream-host-agent.py calls:

["docker", "compose"] + flags + ["up", "-d", "--no-deps", service_id]

The --no-deps flag tells Docker Compose to skip all depends_on dependencies. Extensions that bundle sidecar services in their compose fragment (e.g. Paperless-NGX ships paperless-postgres + paperless-redis alongside the main paperless-ngx service) never have those sidecars started, so the main container boots into a broken state.

Observed behaviour

Paperless-NGX install logs:

Waiting for PostgreSQL to start...
Connected to PostgreSQL          ← postgres was already running from a previous attempt
Waiting for Redis...
Redis ping #0 failed.
Error: Error -2 connecting to paperless-redis:6379. Name or service not known.
Redis ping #1 failed.
...

paperless-redis (and paperless-postgres on a first-ever install) are never started because --no-deps skips them.

Root cause

dream-host-agent.py_handle_install(), Step 3 (line ~1151):

start_result = subprocess.run(
    ["docker", "compose"] + flags + ["up", "-d", "--no-deps", service_id],
    ...
)

--no-deps exists in docker_compose_recreate() (for forced recreates of already-running services where skipping deps is correct), but was incorrectly carried into the install path.

Affected extensions

Any extension whose compose fragment declares services beyond the primary one: paperless-ngx (postgres + redis), and any future extension that follows the same pattern.

Suggested fix

Remove --no-deps from the install path. With it gone, docker compose up -d paperless-ngx will respect the depends_on: { paperless-postgres: {condition: service_healthy}, paperless-redis: {condition: service_healthy} } block and start the sidecars first.

# Step 3 — start (with deps so sidecars are created too)
["docker", "compose"] + flags + ["up", "-d", service_id],

--no-deps should stay on docker_compose_recreate (its use there is intentional — recreating a specific service without touching peers).

Reproduction

  1. Open Dashboard → Extensions
  2. Install Paperless-NGX
  3. Observe Redis failure loop in extension logs

Verified on

  • macOS Apple Silicon (fresh install)
  • Confirmed same code present in upstream/main:dream-server/bin/dream-host-agent.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions