diun: upgrade to 4.17 - diun does not start when installed as a portainer stack

Behaviour

Steps to reproduce this issue

  1. Install diun with docker-compose or upgrade from previous version to 4.17

Expected behaviour

diun should run

Actual behaviour

diun throws error about missing “serve” command and does not run

Configuration

  • Diun version : 4.17
  • Platform (windows/linux) : linux
  • System info (type uname -a) : Linux (redacted) 5.4.114-1-pve #1 SMP PVE 5.4.114-1 (Sun, 09 May 2021 17:13:05 +0200) x86_64 GNU/Linux

Paste your configuration files here

version: "2.1"

services:
  diun:
    image: ghcr.io/crazy-max/diun:latest
    container_name: diun
    volumes:
      - /tempdata/appcache/diun/data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - PUID=1001  # docker
      - PGID=100   # users
      - TZ=Europe/Copenhagen
      - LOG_LEVEL=info
      - DIUN_WATCH_SCHEDULE=20 4 * * *
      - DIUN_WATCH_FIRSTCHECKNOTIF=true
      - DIUN_PROVIDERS_DOCKER=true
      - DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true
      - DIUN_NOTIF_MAIL_HOST=(redacted)
      - DIUN_NOTIF_MAIL_PORT=25
      - DIUN_NOTIF_MAIL_SSL=false
      - DIUN_NOTIF_MAIL_FROM=(redacted)
      - DIUN_NOTIF_MAIL_TO=(redacted)
    labels:
      - diun.enable=true
    restart: unless-stopped

Logs

diun: error: expected one of "serve",  "image",  "notif"
Usage: diun <command>

Docker image update notifier. More info: https://github.com/crazy-max/diun

Flags:
  -h, --help       Show context-sensitive help.
      --version

:
  serve            Starts Diun server.
  image list       List images in database.
  image remove     Remove an image manifest from database.
  notif test       Test notification settings.
  image inspect    Display information of an image in database.
  
Run "diun <command> --help" for more information on a command.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I have Portainer version 2.5.1 and just updated the stack with command: serve and all works fine now.

Thank you, @crazy-max

So I’m not sure of the conclusion here… re-create the stack to make it work, or just add the command line, which might also work, I cannot say for sure. Too late to test for me now 😃 It’s working here, thank you for your help @crazy-max

@Miwer In the meantime you can force the command field:

version: "2.1"

services:
  diun:
    image: ghcr.io/crazy-max/diun:latest
    container_name: diun
    command: serve
    volumes:
      - /tempdata/appcache/diun/data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - PUID=1001  # docker
      - PGID=100   # users
      - TZ=Europe/Copenhagen
      - LOG_LEVEL=info
      - DIUN_WATCH_SCHEDULE=20 4 * * *
      - DIUN_WATCH_FIRSTCHECKNOTIF=true
      - DIUN_PROVIDERS_DOCKER=true
      - DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true
      - DIUN_NOTIF_MAIL_HOST=(redacted)
      - DIUN_NOTIF_MAIL_PORT=25
      - DIUN_NOTIF_MAIL_SSL=false
      - DIUN_NOTIF_MAIL_FROM=(redacted)
      - DIUN_NOTIF_MAIL_TO=(redacted)
    labels:
      - diun.enable=true
    restart: unless-stopped