Skip to content

db path not working through config, only environment var #1459

@totti4ever

Description

@totti4ever

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

setting

db:
  path: /data/diun-my.db

doesn't work, it's still using the default name. Debug mode also shows no change:

Sat, 02 Aug 2025 23:37:37 CEST DBG {
  "db": {
    "path": "/data/diun.db"
  },

using the env var everything is fine

Expected behaviour

as stated in the docs (https://crazymax.dev/diun/config/db/) both ways shoudl work

Actual behaviour

it is not working

Steps to reproduce

  1. set db path in config
  2. see that nothing changes
  3. set it in var
  4. everything is fine

Diun version

v4.29.0

Docker info

$ docker info
Client: Docker Engine - Community
 Version:    28.3.3
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 24
  Running: 21
  Paused: 0
  Stopped: 3
 Images: 27
 Server Version: 28.3.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
  no-new-privileges
 Kernel Version: 6.12.28-current-meson64
 Operating System: Armbian 25.5.1 jammy
 OSType: linux
 Architecture: aarch64
 CPUs: 6
 Total Memory: 3.684GiB
 Name: kea
 ID: c0c6d8f8-8e58-4ad2-9cb4-41593db75db3
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

Logs

Sat, 02 Aug 2025 23:37:37 CEST INF Starting Diun version=v4.29.0
Sat, 02 Aug 2025 23:37:37 CEST INF Configuration loaded from file: /data/config-two.yml
Sat, 02 Aug 2025 23:37:37 CEST INF Configuration loaded from 1 environment variable(s)
Sat, 02 Aug 2025 23:37:37 CEST DBG {
  "db": {
    "path": "/data/diun.db"
  },
  "watch": {
    "workers": 10,
    "schedule": "0 */6 * * *",
    "jitter": 30000000000,
    "firstCheckNotif": true,
    "runOnStartup": true,
    "compareDigest": true
  },
  "defaults": {
    "watchRepo": false,
    "notifyOn": [
      "new",
      "update"
    ],
    "sortTags": "reverse"
  },
  "providers": {
    "docker": {
      "endpoint": "http://my.endpoint",
      "apiVersion": "1.50",
      "tlsVerify": false,
      "watchByDefault": true,
      "watchStopped": false
    }
  }
}
Sat, 02 Aug 2025 23:37:37 CEST WRN No notifier available
Sat, 02 Aug 2025 23:37:47 CEST FTL Cannot initialize Diun error=timeout

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions