mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-26 08:48:50 +00:00
349917e7e4
Configuration file not required anymore DIUN_DB env var renamed DIUN_DB_PATH Only accept duration as timeout value (10 becomes 10s) Add getting started doc Enhanced documentation Add note about test notifications (#79) Improve configuration management Fix telegram init All fields in configuration now camelCased Improve configuration validation Update doc Update FAQ Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2.3 KiB
2.3 KiB
Getting started
Diun CLI
$ ./diun --help
Usage: diun
Docker image update notifier. More info: https://github.com/crazy-max/diun
Flags:
--help Show context-sensitive help.
--version
--config=STRING Diun configuration file ($CONFIG).
--timezone="UTC" Timezone assigned to Diun ($TZ).
--log-level="info" Set log level ($LOG_LEVEL).
--log-json Enable JSON logging output ($LOG_JSON).
--log-caller Add file:line of the caller to log output ($LOG_CALLER).
--test-notif Test notification settings.
Following environment variables can be used in place of flags:
CONFIG
: Diun configuration fileTZ
: Timezone assigned (defaultUTC
)LOG_LEVEL
: Log level output (defaultinfo
)LOG_JSON
: Enable JSON logging output (defaultfalse
)LOG_CALLER
: Enable to addfile:line
of the caller (defaultfalse
)
Run with the Docker provider
Create a docker-compose.yml
file that uses the official Diun image:
version: "3.5"
services:
diun:
image: crazymax/diun:latest
volumes:
- "./data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "TZ=Europe/Paris"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
- "DIUN_WATCH_WORKERS=20"
- "DIUN_WATCH_SCHEDULE=*/30 * * * *"
- "DIUN_PROVIDERS_DOCKER=true"
- "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
restart: always
Here we use a minimal configuration to analyze all running containers (watch by default enabled) of your local Docker instance every 30 minutes.
That's it. Now you can launch Diun with the following command:
$ docker-compose up -d
If you prefer to rely on the configuration file instead of environment variables:
version: "3.5"
services:
diun:
image: crazymax/diun:latest
volumes:
- "./data:/data"
- "./diun.yml:/diun.yml:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "CONFIG=/diun.yml"
- "TZ=Europe/Paris"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
restart: always
# ./diun.yml
watch:
workers: 20
schedule: "*/30 * * * *"
firstCheckNotif: false
providers:
docker: {}