Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using "DIUN_NOTIF_MAIL_HOST" variable #1034

Closed
3 tasks done
huntson opened this issue Nov 25, 2023 · 3 comments
Closed
3 tasks done

Error when using "DIUN_NOTIF_MAIL_HOST" variable #1034

huntson opened this issue Nov 25, 2023 · 3 comments

Comments

@huntson
Copy link

huntson commented Nov 25, 2023

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

When using the variable "DIUN_NOTIF_MAIL_HOST" in the environment variables section of my docker-compose fiyaml, the following error appears:

Sat, 25 Nov 2023 17:18:10 EST FTL Cannot load configuration error="failed to decode configuration from environment variables: Failed to decode configuration from environment variables: field not found, node: host "

Expected behaviour

The docker should take this and allow me to send emails. I can confirm when removing this line, the docker starts ok. Perhaps this argument needs to be modified a bit to work?

Actual behaviour

See log output above?

Steps to reproduce

  1. Deploy docker as such:
version: '3.5'
services:
  diun:
    image: crazymax/diun:latest
    container_name: diun
    command: serve
    volumes:
      - /share/CACHEDEV1_DATA/docker/diun:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=TRUE
      - TZ=America/New_York
      - LOG_LEVEL=debug
      - LOG_JSON=false
      - DIUN_WATCH_WORKERS=20
      - DIUN_WATCH_SCHEDULE=0 */6 * * *
      - DIUN_WATCH_JITTER=30s
      - DIUN_PROVIDERS_DOCKER=true
      - DIUN_WATCH_RUNONSTARTUP=true
      - DIUN_NOTIF_MAIL_HOST = 'mail.optonline.net'
      - DIUN_NOTIF_MAIL_INSECURESKIPVERIFY=true
      - DIUN_NOTIF_MAIL_PORT = 25
      - DIUN_NOTIF_MAIL_SSL = false
      - DIUN_NOTIF_MAIL_FROM = [email protected]
      - DIUN_NOTIF_MAIL_TO = [email protected]
  
    restart: always
  1. observe logs

Diun version

4.26.0

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc., v2.14.1-qnap1)

Server:
 Containers: 44
  Running: 36
  Paused: 0
  Stopped: 8
 Images: 67
 Server Version: 20.10.22-qnap7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay qnet
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: kata-runtime runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 78f51771157abb6c9ed224c22013cdf09962315d
 runc version: v1.1.4-0-g5fd4c4d1
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.10.60-qnap
 Operating System: QTS 5.1.3 (20231110)
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 62.76GiB
 Name: xserve2
 ID: 23GK:ISPO:T6LN:ELDU:ZPAZ:Z6RW:BQBX:NY5W:BKTM:DMVN:DMUF:KPVJ
 Docker Root Dir: /share/CACHEDEV1_DATA/docker/container-station-data/lib/docker
 Debug Mode: true
  File Descriptors: 896
  Goroutines: 356
  System Time: 2023-11-25T17:21:34.840484507-05:00
  EventsListeners: 2
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 172.29.0.0/16, Size: 22

Docker Compose config

No response

Logs

See above

Additional info

No response

@crazy-max
Copy link
Owner

crazy-max commented Nov 25, 2023

Syntax of env vars in your compose file looks wrong.

You can validate it with docker compose config command.

See also https://crazymax.dev/diun/usage/basic-example/#setup

@huntson
Copy link
Author

huntson commented Nov 25, 2023

That's what I guess however I do not see what is wrong with it. Are you simply talking about the quotes?

@chris-1243
Copy link

Have you tried to remove the spaces?

You wrote "DIUN_NOTIF_MAIL_HOST = your value"

But if i am not wrong, it should be:

"DIUN_NOTIF_MAIL_HOST=your value"

Check your syntax as suggested and your compose file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants