diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c932676..2007f46 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,9 +10,10 @@ Contributions to this project are [released](https://help.github.com/articles/gi 2. Configure and install the dependencies: `go mod download` 3. Create a new branch: `git checkout -b my-branch-name` 4. Make your change -5. Build your code with [GoReleaser](https://goreleaser.com/): `goreleaser release --skip-publish --skip-validate --rm-dist` -6. Push to your fork and [submit a pull request](https://github.com/crazy-max/diun/compare) -7. Pat your self on the back and wait for your pull request to be reviewed and merged. +5. Test your code: `go test -covermode=atomic ./...` +6. Build with [GoReleaser](https://goreleaser.com/): `goreleaser release --skip-publish --skip-validate --rm-dist` +7. Push to your fork and [submit a pull request](https://github.com/crazy-max/diun/compare) +8. Pat your self on the back and wait for your pull request to be reviewed and merged. Here are a few things you can do that will increase the likelihood of your pull request being accepted: diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 406efb1..da94191 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,5 +1,7 @@ # Support [](https://isitmaintained.com/project/crazy-max/diun) +First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md). + ## Reporting an issue Please do a search in [open issues](https://github.com/crazy-max/diun/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c6424d..79763c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,12 +9,20 @@ on: - 'v*' paths-ignore: - '**.md' + - '.github/workflows/docs.yml' + - 'docs/**' + - 'Dockerfile.mkdocs' + - 'mkdocs.yml' pull_request: branches: - 'master' - 'v*' paths-ignore: - '**.md' + - '.github/workflows/docs.yml' + - 'docs/**' + - 'Dockerfile.mkdocs' + - 'mkdocs.yml' jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5556a10 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: docs + +on: + push: + branches: + - 'master' + - 'v*' + tags: + - 'v*' + paths: + - '.github/workflows/docs.yml' + - 'docs/**' + - 'Dockerfile.mkdocs' + - 'mkdocs.yml' + pull_request: + branches: + - 'master' + - 'v*' + paths: + - '.github/workflows/docs.yml' + - 'docs/**' + - 'Dockerfile.mkdocs' + - 'mkdocs.yml' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Build mkdocs Docker image + run: | + docker build -t mkdocs -f ./Dockerfile.mkdocs ./ + - + name: Build docs + run: | + docker run --rm -v "$(pwd):/docs" mkdocs build --strict + sudo chown -R $(id -u):$(id -g) ./site + - + name: Deploy + if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch) + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: site + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index bf0cf15..b1ff764 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ .dev /bin /dist + +/site diff --git a/.res/screenshot.png b/.res/screenshot.png new file mode 100644 index 0000000..09b8d6d Binary files /dev/null and b/.res/screenshot.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md index c7ec7cf..e481f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 3.0.0 (2020/05/27) +> :warning: See **Migration notes** in the documentation for breaking changes. + * Add script notification (#53) * Add Teams notification (#72) * Add `--test-notif` flag (#23) @@ -23,8 +25,6 @@ * Add upgrade notes * Update deps -> :warning: See [**UPGRADE NOTES**](UPGRADE.md#2x--3x) for breaking changes. - ## 2.6.1 (2020/03/26) * Downgrade containers/image to 5.2.1 (#54) @@ -66,6 +66,8 @@ ## 2.0.0 (2019/12/14) +> :warning: See **Migration notes** in the documentation for breaking changes. + * Include provider in notifications * Add providers documentation * Move image validation and improve job execution @@ -78,8 +80,6 @@ * Go 1.13.5 * Seconds field optional for schedule -> :warning: See [**UPGRADE NOTES**](UPGRADE.md#1x--2x) for breaking changes. - ## 1.4.1 (2019/10/20) * Update deps @@ -121,6 +121,8 @@ ## 1.0.0 (2019/07/01) +> :warning: See **Migration notes** in the documentation for breaking changes. + * Always run on startup. Flag `--run-startup` removed. * Display next execution time * Use v3 robfig/cron @@ -129,8 +131,6 @@ * Review config file structure * Improve worker pool -> :warning: See [**UPGRADE NOTES**](UPGRADE.md#0x--1x) for breaking changes. - ## 0.5.0 (2019/06/09) * Add worker pool to parallelize analyses diff --git a/Dockerfile.mkdocs b/Dockerfile.mkdocs new file mode 100644 index 0000000..ffc851c --- /dev/null +++ b/Dockerfile.mkdocs @@ -0,0 +1,12 @@ +FROM squidfunk/mkdocs-material:5.3.0 + +RUN \ + apk add --no-cache \ + git \ + git-fast-import \ + openssh \ + && apk add --no-cache --virtual .build gcc musl-dev \ + && pip install --no-cache-dir \ + 'mkdocs-macros-plugin' \ + && apk del .build gcc musl-dev \ + && rm -rf /tmp/* diff --git a/README.md b/README.md index 6f63142..e42c8b1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@
+ D ocker I mage U pdate N otifier {{ config.site_description }}.
@@ -20,38 +21,11 @@
[Docker image](https://hub.docker.com/r/crazymax/diun/)) to receive notifications when a Docker image is updated on
a Docker registry.
-
-
-## Features
-
-* Allow to watch a Docker repository and report new tags
-* Include and exclude filters with regular expression for tags
-* Internal cron implementation through go routines
-* Worker pool to parallelize analyses
-* Allow overriding image os and architecture
-* [Docker](doc/providers/docker.md), [Swarm](doc/providers/swarm.md),
-[Kubernetes](doc/providers/kubernetes.md) and [File](doc/providers/file.md) providers available
-* Get notified through Gotify, Mail, Slack, Telegram and [more](doc/notifications.md)
-* Enhanced logging
-* Timezone can be changed
-* Official [Docker image available](doc/install/docker.md)
+
## Documentation
-* Install
- * [With Docker](doc/install/docker.md)
- * [From binary](doc/install/binary.md)
- * [Linux service](doc/install/linux-service.md)
-* [Getting started](doc/getting-started.md)
-* [Configuration](doc/configuration.md)
-* Providers
- * [Docker](doc/providers/docker.md)
- * [Swarm](doc/providers/swarm.md)
- * [Kubernetes](doc/providers/kubernetes.md)
- * [File](doc/providers/file.md)
-* [Notifications](doc/notifications.md)
-* [FAQ](doc/faq.md)
-* [Upgrade notes](UPGRADE.md)
+Documentation can be found on https://crazy-max.github.io/diun/
## How can I help?
diff --git a/UPGRADE.md b/UPGRADE.md
deleted file mode 100644
index 97149d2..0000000
--- a/UPGRADE.md
+++ /dev/null
@@ -1,158 +0,0 @@
-# Upgrade notes
-
-* [2.x > 3.x](#2x--3x)
- * [File provider](#file-provider)
- * [Allow only one Docker and Swarm provider](#allow-only-one-docker-and-swarm-provider)
- * [Remove `enable` setting for notifiers](#remove-enable-setting-for-notifiers)
-* [1.x > 2.x](#1x--2x)
-* [0.x > 1.x](#0x--1x)
-
-## 2.x > 3.x
-
-### File provider
-
-`static` provider has been renamed `file`. This now allows the static configuration to be declared in one or more files to avoid overloading the current configuration file and also dynamic updating.
-
-> **2.x**
-```yaml
-providers:
- static:
- - name: docker.io/crazymax/diun
- watch_repo: true
- max_tags: 10
-```
-
-> **3.x**
-```yaml
-providers:
- file:
- # Watch images from filename /path/to/config.yml
- filename: /path/to/config.yml
- # OR watch images from directory /path/to/config/folder
- directory: /path/to/config/folder
-```
-```yaml
-# /path/to/config.yml
-- name: docker.io/crazymax/diun
- watch_repo: true
- max_tags: 10
-```
-
-### Allow only one Docker and Swarm provider
-
-Now you can declare only one Docker and/or Swarm provider.
-
-> **2.x**
-```yaml
-providers:
- docker:
- mydocker:
- watch_stopped: true
- providers:
- swarm:
- myswarm:
- watch_by_default: true
-```
-
-> **3.x**
-```yaml
-providers:
- docker:
- watch_stopped: true
- swarm:
- watch_by_default: true
-```
-
-### Remove `enable` setting for notifiers
-
-The `enable` entry has been removed for notifiers. If you don't want a notifier to be enabled, you must now remove its configuration.
-
-> **2.x**
-```yaml
-notif:
- amqp:
- enable: false
- host: localhost
- port: 5672
- gotify:
- enable: true
- endpoint: http://gotify.foo.com
- token: Token123456
- priority: 1
- timeout: 10
-```
-
-> **3.x**
-```yaml
-notif:
- gotify:
- endpoint: http://gotify.foo.com
- token: Token123456
- priority: 1
- timeout: 10
-```
-
-## 1.x > 2.x
-
-`image` field has been moved to `providers.static` in configuration file:
-
-> **1.x**
-```yaml
-image:
- - name: docker.io/crazymax/diun
- watch_repo: true
- max_tags: 10
-```
-
-> **2.x**
-```yaml
-providers:
- static:
- - name: docker.io/crazymax/diun
- watch_repo: true
- max_tags: 10
-```
-
-See [providers configuration](doc/configuration.md#providers) for more info.
-
-## 0.x > 1.x
-
-Some fields in configuration file has been changed:
-
-* `registries` renamed `regopts`
-* `items` renamed `image`
-* `items[].image` renamed `image[].name`
-* `items[].registry_id` renamed `image[].regopts_id`
-* `watch.os` and `watch.arch` moved to `image[].os` and `image[].arch`
-
-> **0.x**
-```yaml
-watch:
- os: linux
- arch: amd64
-
-registries:
- someregistryoptions:
- username: foo
- password: bar
- timeout: 20
-
-items:
- - image: docker.io/crazymax/nextcloud:latest
- registry_id: someregistryoptions
-```
-
-> **1.x**
-```yaml
-regopts:
- someregistryoptions:
- username: foo
- password: bar
- timeout: 20
-
-image:
- - name: docker.io/crazymax/nextcloud:latest
- regopts_id: someregistryoptions
- os: linux
- arch: amd64
-```
diff --git a/doc/install/binary.md b/doc/install/binary.md
deleted file mode 100644
index d2c50cb..0000000
--- a/doc/install/binary.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Installation from binary
-
-## Download
-
-Diun binaries are available in [releases](https://github.com/crazy-max/diun/releases) page.
-
-Choose the archive matching the destination platform and extract diun:
-
-```
-wget -qO- https://github.com/crazy-max/diun/releases/download/v3.0.0/diun_3.0.0_linux_x86_64.tar.gz | tar -zxvf - diun
-```
-
-After getting the binary, it can be tested with [`./diun --help`](../getting-started.md#diun-cli) command and moved to a permanent location.
-
-## Server configuration
-
-Steps below are the recommended server configuration.
-
-### Prepare environment
-
-Create user to run diun (ex. `diun`)
-
-```
-groupadd diun
-useradd -s /bin/false -d /bin/null -g diun diun
-```
-
-### Create required directory structure
-
-```
-mkdir -p /var/lib/diun
-chown diun:diun /var/lib/diun/
-chmod -R 750 /var/lib/diun/
-mkdir /etc/diun
-chown diun:diun /etc/diun
-chmod 770 /etc/diun
-```
-
-### Configuration
-
-Create your first [configuration](../configuration.md) file in `/etc/diun/diun.yml` and type:
-
-```
-chown diun:diun /etc/diun/diun.yml
-chmod 644 /etc/diun/diun.yml
-```
-
-> 💡 Not required if you want to only rely on environment variables
-
-### Copy binary to global location
-
-```
-cp diun /usr/local/bin/diun
-```
-
-## Running Diun
-
-After the above steps, two options to run Diun:
-
-### 1. Creating a service file (recommended)
-
-See how to create [Linux service](linux-service.md) to start Diun automatically.
-
-### 2. Running from command-line/terminal
-
-```
-DIUN_DB_PATH=/var/lib/diun/diun.db /usr/local/bin/diun --config /etc/diun/diun.yml
-```
-
-## Updating to a new version
-
-You can update to a new version of Diun by stopping it, replacing the binary at `/usr/local/bin/diun` and restarting the instance.
-
-If you have carried out the installation steps as described above, the binary should have the generic name `diun`. Do not change this, i.e. to include the version number.
diff --git a/doc/install/docker.md b/doc/install/docker.md
deleted file mode 100644
index cdec993..0000000
--- a/doc/install/docker.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Installation with Docker
-
-Diun provides automatically updated Docker :whale: images within [Docker Hub](https://hub.docker.com/r/crazymax/diun). It is possible to always use the latest stable tag or to use another service that handles updating Docker images.
-
-Following platforms for this image are available:
-
-```
-$ docker run --rm mplatform/mquery crazymax/diun:latest
-Image: crazymax/diun:latest
- * Manifest List: Yes
- * Supported platforms:
- - linux/amd64
- - linux/arm/v6
- - linux/arm/v7
- - linux/arm64
- - linux/386
- - linux/ppc64le
- - linux/s390x
-```
-
-## Volumes
-
-* `/data`: Contains bbolt database which retains Docker images manifests
-
-## Usage
-
-Docker compose is the recommended way to run this image. Copy the content of folder [.res/compose](../../.res/compose) in `/opt/diun/` on your host for example. Edit the compose file with your preferences and run the following commands:
-
-```
-docker-compose up -d
-docker-compose logs -f
-```
-
-Or use the following command:
-
-```
-$ docker run -d --name diun \
- -e "TZ=Europe/Paris" \
- -e "LOG_LEVEL=info" \
- -e "LOG_JSON=false" \
- -e "DIUN_WATCH_WORKERS=20" \
- -e "DIUN_WATCH_SCHEDULE=*/30 * * * *" \
- -e "DIUN_PROVIDERS_DOCKER=true" \
- -e "DIUN_PROVIDERS_DOCKER_WATCHSTOPPED=true" \
- -v "$(pwd)/data:/data" \
- -v "/var/run/docker.sock:/var/run/docker.sock" \
- crazymax/diun:latest
-```
-
-To upgrade your installation to the latest release:
-
-```
-docker-compose pull
-docker-compose up -d
-```
diff --git a/doc/install/linux-service.md b/doc/install/linux-service.md
deleted file mode 100644
index abf880b..0000000
--- a/doc/install/linux-service.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Run as service on Debian based distro
-
-## Using systemd
-
-> :warning: Make sure to follow the instructions to [install from binary](binary.md) before.
-
-Run the below command in a terminal:
-
-```
-sudo vim /etc/systemd/system/diun.service
-```
-
-Copy the sample [diun.service](../../.res/examples/systemd/diun.service).
-
-Change the user, group, and other required startup values following your needs.
-
-Enable and start Diun at boot:
-
-```
-sudo systemctl enable diun
-sudo systemctl start diun
-```
-
-To view logs:
-
-```
-journalctl -fu diun.service
-```
diff --git a/doc/notifications.md b/doc/notifications.md
deleted file mode 100644
index 79e7a3f..0000000
--- a/doc/notifications.md
+++ /dev/null
@@ -1,267 +0,0 @@
-# Notifications
-
-* [Amqp](#amqp)
-* [Gotify](#gotify)
-* [Mail](#mail)
-* [Rocket.Chat](#rocketchat)
-* [Script](#script)
-* [Slack / Mattermost](#slack--mattermost)
-* [Teams](#teams)
-* [Telegram](#telegram)
-* [Webhook](#webhook)
-
-## Amqp
-
-You can send notifications to any amqp compatible server with the following settings.
-
-### Configuration file
-
-* `amqp`
- * `host`: AMQP server host (default `localhost`). **required**
- * `port`: AMQP server port (default `5672`). **required**
- * `username`: AMQP username.
- * `usernameFile`: Use content of secret file as AMQP username if `username` not defined.
- * `password`: AMQP password.
- * `passwordFile`: Use content of secret file as AMQP password if `password` not defined.
- * `exchange`: Name of the exchange the message will be sent to.
- * `queue`: Name of the queue the message will be sent to. **required**
-
-### Environment variables
-
-* `DIUN_NOTIF_AMQP_HOST`
-* `DIUN_NOTIF_AMQP_EXCHANGE`
-* `DIUN_NOTIF_AMQP_PORT`
-* `DIUN_NOTIF_AMQP_USERNAME`
-* `DIUN_NOTIF_AMQP_USERNAMEFILE`
-* `DIUN_NOTIF_AMQP_PASSWORD`
-* `DIUN_NOTIF_AMQP_PASSWORDFILE`
-* `DIUN_NOTIF_AMQP_QUEUE`
-
-### Sample
-
-The JSON response will look like this:
-
-```json
-{
- "diun_version": "0.3.0",
- "status": "new",
- "provider": "file",
- "image": "docker.io/crazymax/swarm-cronjob:0.2.1",
- "hub_link": "https://hub.docker.com/r/crazymax/swarm-cronjob",
- "mime_type": "application/vnd.docker.distribution.manifest.v2+json",
- "digest": "sha256:5913d4b5e8dc15430c2f47f40e43ab2ca7f2b8df5eee5db4d5c42311e08dfb79",
- "created": "2019-01-24T10:26:49.152006005Z",
- "platform": "linux/amd64"
-}
-```
-
-## Gotify
-
-Notifications can be sent using a [Gotify](https://gotify.net/) instance.
-
-### Configuration file
-
-* `gotify`
- * `endpoint`: Gotify base URL (e.g. `http://gotify.foo.com`). **required**
- * `token`: Application token. **required**
- * `priority`: The priority of the message (default `1`).
- * `timeout`: Timeout specifies a time limit for the request to be made. (default `10s`).
-
-### Environment variables
-
-* `DIUN_NOTIF_GOTIFY_ENDPOINT`
-* `DIUN_NOTIF_GOTIFY_TOKEN`
-* `DIUN_NOTIF_GOTIFY_PRIORITY`
-* `DIUN_NOTIF_GOTIFY_TIMEOUT`
-
-### Sample
-
-
-
-## Mail
-
-Notifications can be sent through SMTP.
-
-### Configuration file
-
-* `mail`
- * `host`: SMTP server host. (default `localhost`) **required**
- * `port`: SMTP server port. (default `25`) **required**
- * `ssl`: SSL defines whether an SSL connection is used. Should be false in most cases since the auth mechanism should use STARTTLS. (default `false`)
- * `insecureSkipVerify`: Controls whether a client verifies the server's certificate chain and hostname. (default `false`)
- * `username`: SMTP username.
- * `usernameFile`: Use content of secret file as SMTP username if `username` not defined.
- * `password`: SMTP password.
- * `passwordFile`: Use content of secret file as SMTP password if `password` not defined.
- * `from`: Sender email address. **required**
- * `to`: Recipient email address. **required**
-
-### Environment variables
-
-* `DIUN_NOTIF_MAIL_HOST`
-* `DIUN_NOTIF_MAIL_PORT`
-* `DIUN_NOTIF_MAIL_SSL`
-* `DIUN_NOTIF_MAIL_INSECURESKIPVERIFY`
-* `DIUN_NOTIF_MAIL_USERNAME`
-* `DIUN_NOTIF_MAIL_USERNAMEFILE`
-* `DIUN_NOTIF_MAIL_PASSWORD`
-* `DIUN_NOTIF_MAIL_PASSWORDFILE`
-* `DIUN_NOTIF_MAIL_FROM`
-* `DIUN_NOTIF_MAIL_TO`
-
-### Sample
-
-
-
-## Rocket.Chat
-
-Allow to send notifications to your Rocket.Chat channel.
-
-> You must first create a _Personal Access Token_ through your account settings on your RocketChat instance.
-
-### Configuration file
-
-* `rocketchat`
- * `endpoint`: Rocket.Chat base URL (e.g. `http://rocket.foo.com:3000`). **required**
- * `channel`: Channel name with the prefix in front of it. **required**
- * `userID`: User ID. **required**
- * `token`: Authentication token. **required**
- * `timeout`: Timeout specifies a time limit for the request to be made. (default `10s`).
-
-### Environment variables
-
-* `DIUN_NOTIF_ROCKETCHAT_ENDPOINT`
-* `DIUN_NOTIF_ROCKETCHAT_CHANNEL`
-* `DIUN_NOTIF_ROCKETCHAT_USERID`
-* `DIUN_NOTIF_ROCKETCHAT_TOKEN`
-* `DIUN_NOTIF_ROCKETCHAT_TIMEOUT`
-
-### Sample
-
-
-
-## Script
-
-You can call a script when a notification occured. Following environment variables will be passed:
-
-```
-DIUN_VERSION=3.0.0
-DIUN_ENTRY_STATUS=new
-DIUN_ENTRY_PROVIDER=file
-DIUN_ENTRY_IMAGE=docker.io/crazymax/diun:latest
-DIUN_ENTRY_HUBLINK=https://hub.docker.com/r/crazymax/diun
-DIUN_ENTRY_MIMETYPE=application/vnd.docker.distribution.manifest.list.v2+json
-DIUN_ENTRY_DIGEST=sha256:216e3ae7de4ca8b553eb11ef7abda00651e79e537e85c46108284e5e91673e01
-DIUN_ENTRY_CREATED=2020-03-26 12:23:56 +0000 UTC
-DIUN_ENTRY_PLATFORM=linux/amd64
-```
-
-### Configuration file
-
-* `script`
- * `cmd`: Command or script to execute. **required**
- * `args`: List of args to pass to `cmd`.
- * `dir`: Specifies the working directory of the command.
-
-### Environment variables
-
-* `DIUN_NOTIF_SCRIPT_CMD`
-* `DIUN_NOTIF_SCRIPT_ARGS`
-* `DIUN_NOTIF_SCRIPT_DIR`
-
-## Slack / Mattermost
-
-You can send notifications to your Slack channel using an [incoming webhook URL](https://api.slack.com/messaging/webhooks).
-
-### Configuration file
-
-* `slack`
- * `webhookURL`: Slack [incoming webhook URL](https://api.slack.com/messaging/webhooks). **required**
-
-### Environment variables
-
-* `DIUN_NOTIF_SLACK_WEBHOOKURL`
-
-### Sample
-
-
-
-Mattermost webhooks are compatible with Slack notification without any special configuration (if Webhooks are enabled).
-
-## Teams
-
-You can send notifications to your Teams team-channel using an [incoming webhook URL](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/what-are-webhooks-and-connectors).
-
-### Configuration file
-
-* `teams`
- * `webhookURL`: Teams [incoming webhook URL](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/what-are-webhooks-and-connectors). **required**
-
-### Environment variables
-
-* `DIUN_NOTIF_TEAMS_WEBHOOKURL`
-
-### Sample
-
-
-
-## Telegram
-
-Notifications can be sent via Telegram using a [Telegram Bot](https://core.telegram.org/bots).
-
-Follow the [instructions](https://core.telegram.org/bots#6-botfather) to set up a bot and get it's token.
-
-Message the [GetID bot](https://t.me/getidsbot) to find your chat ID.
-Multiple chat IDs can be provided in order to deliver notifications to multiple recipients.
-
-### Configuration file
-
-* `telegram`
- * `token`: Telegram bot token. **required**
- * `chatIDs`: List of chat IDs to send notifications to. **required**
-
-### Environment variables
-
-* `DIUN_NOTIF_TELEGRAM_TOKEN`
-* `DIUN_NOTIF_TELEGRAM_CHATIDS` (comma separated)
-
-### Sample
-
-
-
-## Webhook
-
-You can send webhook notifications with the following settings.
-
-### Configuration file
-
-* `webhook`
- * `endpoint`: URL of the HTTP request. **required**
- * `method`: HTTP method (default `GET`). **required**
- * `headers`: Map of additional headers to be sent (key is case insensitive).
- * `timeout`: Timeout specifies a time limit for the request to be made. (default `10s`)
-
-### Environment variables
-
-* `DIUN_NOTIF_WEBHOOK_ENDPOINT`
-* `DIUN_NOTIF_WEBHOOK_METHOD`
-* `DIUN_NOTIF_WEBHOOK_HEADERS_
+ Diun
+ Sponsors
+
+{% endblock %}
diff --git a/doc/providers/docker.md b/docs/providers/docker.md
similarity index 67%
rename from doc/providers/docker.md
rename to docs/providers/docker.md
index 24d87d3..3ac94c2 100644
--- a/doc/providers/docker.md
+++ b/docs/providers/docker.md
@@ -1,12 +1,5 @@
# Docker provider
-* [About](#about)
-* [Quick start](#quick-start)
-* [Provider configuration](#provider-configuration)
- * [Configuration file](#configuration-file)
- * [Environment variables](#environment-variables)
-* [Docker labels](#docker-labels)
-
## About
The Docker provider allows you to analyze the containers of your Docker instance to extract images found and check for updates on the registry.
@@ -81,87 +74,104 @@ diun_1 | Sat, 14 Dec 2019 15:30:13 CET INF Cron initialized with schedul
diun_1 | Sat, 14 Dec 2019 15:30:13 CET INF Next run in 29 minutes (2019-12-14 16:00:00 +0100 CET)
```
-## Provider configuration
+## Configuration
-### Configuration file
+!!! hint
+ Environment variable `DIUN_PROVIDERS_DOCKER=true` can be used to enable this provider with default values.
-#### `endpoint`
+### `endpoint`
Server address to connect to. Local if empty.
-```yaml
-providers:
- docker:
- endpoint: "unix:///var/run/docker.sock"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ endpoint: "unix:///var/run/docker.sock"
+ ```
-#### `apiVersion`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_ENDPOINT`
+
+### `apiVersion`
Overrides the client version with the specified one.
-```yaml
-providers:
- docker:
- apiVersion: "1.39"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ apiVersion: "1.39"
+ ```
-#### `tlsCertsPath`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_APIVERSION`
+
+### `tlsCertsPath`
Path to load the TLS certificates from.
-```yaml
-providers:
- docker:
- tlsCertsPath: "/certs/"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ tlsCertsPath: "/certs/"
+ ```
-#### `tlsVerify`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_TLSCERTSPATH`
+
+### `tlsVerify`
Controls whether client verifies the server's certificate chain and hostname (default `true`).
-```yaml
-providers:
- docker:
- tlsVerify: true
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ tlsVerify: true
+ ```
-#### `watchByDefault`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_TLSVERIFY`
+
+### `watchByDefault`
Enable watch by default. If false, containers that don't have `diun.enable=true` label will be ignored (default `false`).
-```yaml
-providers:
- docker:
- watchByDefault: false
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ watchByDefault: false
+ ```
-#### `watchStopped`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT`
+
+### `watchStopped`
Include created and exited containers too (default `false`).
-```yaml
-providers:
- docker:
- watchStopped: false
-```
+!!! example "File"
+ ```yaml
+ providers:
+ docker:
+ watchStopped: false
+ ```
-### Environment variables
-
-* `DIUN_PROVIDERS_DOCKER`
-* `DIUN_PROVIDERS_DOCKER_ENDPOINT`
-* `DIUN_PROVIDERS_DOCKER_APIVERSION`
-* `DIUN_PROVIDERS_DOCKER_TLSCERTSPATH`
-* `DIUN_PROVIDERS_DOCKER_TLSVERIFY`
-* `DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT`
-* `DIUN_PROVIDERS_DOCKER_WATCHSTOPPED`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_DOCKER_WATCHSTOPPED`
## Docker labels
You can configure more finely the way to analyze the image of your container through Docker labels:
-* `diun.enable`: Set to true to enable image analysis of this container.
-* `diun.regopts_id`: Registry options ID from [`regopts`](../configuration.md#regopts) to use.
-* `diun.watch_repo`: Watch all tags of this container image (default `false`).
-* `diun.max_tags`: Maximum number of tags to watch if `diun.watch_repo` enabled. 0 means all of them (default `0`).
-* `diun.include_tags`: Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo`.
-* `diun.exclude_tags`: Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo`.
+| Name | Default | Description |
+|-------------------------------|---------------|---------------|
+| `diun.enable` | | Set to true to enable image analysis of this container |
+| `diun.regopts_id` | | Registry options ID from [`regopts`](../config/regopts.md) to use |
+| `diun.watch_repo` | `false` | Watch all tags of this container image |
+| `diun.max_tags` | `0` | Maximum number of tags to watch if `diun.watch_repo` enabled. `0` means all of them |
+| `diun.include_tags` | | Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo` |
+| `diun.exclude_tags` | | Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo` |
diff --git a/doc/providers/file.md b/docs/providers/file.md
similarity index 68%
rename from doc/providers/file.md
rename to docs/providers/file.md
index 49fb026..dc57855 100644
--- a/doc/providers/file.md
+++ b/docs/providers/file.md
@@ -1,13 +1,5 @@
# File provider
-* [About](#about)
-* [Example](#example)
-* [Quick start](#quick-start)
-* [Provider configuration](#provider-configuration)
- * [Configuration file](#configuration-file)
- * [Environment variables](#environment-variables)
-* [YAML configuration file](#yaml-configuration-file)
-
## About
The file provider lets you define Docker images to analyze through a YAML file or a directory.
@@ -32,7 +24,7 @@ regopts:
onemore:
username: foo2
password: bar2
- insecureTls: true
+ insecureTLS: true
providers:
file:
@@ -129,50 +121,54 @@ Sat, 14 Dec 2019 15:32:28 UTC INF Cron initialized with schedule * * * * *
Sat, 14 Dec 2019 15:32:28 UTC INF Next run in 31 seconds (2019-12-14 15:33:00 +0000 UTC)
```
-## Provider configuration
+## Configuration
-### Configuration file
-
-#### `filename`
+### `filename`
Defines the path to the [configuration file](#yaml-configuration-file).
-> :warning: `filename` and `directory` are mutually exclusive.
+!!! warning
+ `filename` and `directory` are mutually exclusive
-```yaml
-providers:
- file:
- filename: /path/to/config/conf.yml
-```
+!!! example "File"
+ ```yaml
+ providers:
+ file:
+ filename: /path/to/config/conf.yml
+ ```
-#### `directory`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_FILE_FILENAME`
+
+### `directory`
Defines the path to the directory that contains the [configuration files](#yaml-configuration-file) (`*.yml` or `*.yaml`).
-> :warning: `filename` and `directory` are mutually exclusive.
+!!! warning
+ `filename` and `directory` are mutually exclusive
-```yaml
-providers:
- file:
- directory: /path/to/config
-```
+!!! example "File"
+ ```yaml
+ providers:
+ file:
+ directory: /path/to/config
+ ```
-### Environment variables
-
-* `DIUN_PROVIDERS_FILE_DIRECTORY`
-* `DIUN_PROVIDERS_FILE_FILENAME`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_FILE_DIRECTORY`
## YAML configuration file
The configuration file(s) defines a slice of images to analyze with the following fields:
-* `name`: Docker image name to watch using `registry/path:tag` format. If registry omitted, `docker.io` will be used and if tag omitted, `latest` will be used. **required**
-* `regopts_id`: Registry options ID from [`regopts`](../configuration.md#regopts) to use.
-* `watch_repo`: Watch all tags of this `image` repository (default `false`).
-* `max_tags`: Maximum number of tags to watch if `watch_repo` enabled. 0 means all of them (default `0`).
-* `include_tags`: List of regular expressions to include tags. Can be useful if you enable `watch_repo`.
-* `exclude_tags`: List of regular expressions to exclude tags. Can be useful if you enable `watch_repo`.
-* `platform`: Check a custom platform. (default will retrieve platform dynamically based on your operating system).
- * `os`: Operating system to use.
- * `arch`: CPU architecture to use.
- * `variant`: Variant of the CPU to use.
+| Name | Default | Description |
+|-------------------------------|----------------------------------|---------------|
+| `name` | `latest` | Docker image name to watch using `registry/path:tag` format. If registry omitted, `docker.io` will be used and if tag omitted, `latest` will be used |
+| `regopts_id` | | Registry options ID from [`regopts`](../config/regopts.md) to use |
+| `watch_repo` | `false` | Watch all tags of this image |
+| `max_tags` | `0` | Maximum number of tags to watch if `watch_repo` enabled. `0` means all of them |
+| `include_tags` | | List of regular expressions to include tags. Can be useful if you enable `watch_repo` |
+| `exclude_tags` | | List of regular expressions to exclude tags. Can be useful if you enable `watch_repo` |
+| `platform.os` | dynamic based on your OS specs | Operating system to use as custom platform |
+| `platform.arch` | dynamic based on your OS specs | CPU architecture to use as custom platform |
+| `platform.variant` | dynamic based on your OS specs | Variant of the CPU to use as custom platform |
diff --git a/doc/providers/kubernetes.md b/docs/providers/kubernetes.md
similarity index 70%
rename from doc/providers/kubernetes.md
rename to docs/providers/kubernetes.md
index 93270ea..d4188c6 100644
--- a/doc/providers/kubernetes.md
+++ b/docs/providers/kubernetes.md
@@ -1,12 +1,5 @@
# Kubernetes provider
-* [About](#about)
-* [Quick start](#quick-start)
-* [Provider configuration](#provider-configuration)
- * [Configuration file](#configuration-file)
- * [Environment variables](#environment-variables)
-* [Kubernetes annotations](#kubernetes-annotations)
-
## About
The Kubernetes provider allows you to analyze the pods of your Kubernetes cluster to extract images found and check for updates on the registry.
@@ -160,19 +153,24 @@ Wed, 17 Jun 2020 10:50:03 CEST INF New image found image=docker.io/library/nginx
...
```
-## Provider configuration
+## Configuration
-### Configuration file
+!!! hint
+ Environment variable `DIUN_PROVIDERS_KUBERNETES=true` can be used to enable this provider with default values.
-#### `endpoint`
+### `endpoint`
The Kubernetes server endpoint as URL.
-```yaml
-providers:
- kubernetes:
- endpoint: "http://localhost:8080"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ endpoint: "http://localhost:8080"
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_ENDPOINT`
Kubernetes server endpoint as URL, which is only used when the behavior based on environment variables described below does not apply.
@@ -182,86 +180,101 @@ The access token is looked up in `/var/run/secrets/kubernetes.io/serviceaccount/
When the environment variables are not found, Diun tries to connect to the Kubernetes API server with an external-cluster client. In which case, the endpoint is required. Specifically, it may be set to the URL used by `kubectl proxy` to connect to a Kubernetes cluster using the granted authentication and authorization of the associated kubeconfig.
-#### `token`
-
-```yaml
-providers:
- kubernetes:
- token: "atoken"
-```
+### `token`
Bearer token used for the Kubernetes client configuration.
-#### `tokenFile`
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ token: "atoken"
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_TOKEN`
+
+### `tokenFile`
Use content of secret file as bearer token if `token` not defined.
-```yaml
-providers:
- kubernetes:
- tokenFile: "/run/secrets/token"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ tokenFile: "/run/secrets/token"
+ ```
-#### `certAuthFilePath`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_TOKEN`
+
+### `certAuthFilePath`
Path to the certificate authority file. Used for the Kubernetes client configuration.
-```yaml
-providers:
- kubernetes:
- certAuthFilePath: "/a/ca.crt"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ certAuthFilePath: "/a/ca.crt"
+ ```
-#### `tlsInsecure`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_CERTAUTHFILEPATH`
+
+### `tlsInsecure`
Controls whether client does not verify the server's certificate chain and hostname (default `false`).
-```yaml
-providers:
- kubernetes:
- tlsInsecure: false
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ tlsInsecure: false
+ ```
-#### `namespaces`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_TLSINSECURE`
+
+### `namespaces`
Array of namespaces to watch (default all namespaces).
-```yaml
-providers:
- kubernetes:
- namespaces:
- - default
- - production
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ namespaces:
+ - default
+ - production
+ ```
-#### `watchByDefault`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_NAMESPACES` (comma separated)
+
+### `watchByDefault`
Enable watch by default. If false, pods that don't have `diun.enable: "true"` annotation will be ignored (default `false`).
-```yaml
-providers:
- kubernetes:
- watchByDefault: false
-```
+!!! example "File"
+ ```yaml
+ providers:
+ kubernetes:
+ watchByDefault: false
+ ```
-### Environment variables
-
-* `DIUN_PROVIDERS_KUBERNETES`
-* `DIUN_PROVIDERS_KUBERNETES_ENDPOINT`
-* `DIUN_PROVIDERS_KUBERNETES_TOKEN`
-* `DIUN_PROVIDERS_KUBERNETES_TOKENFILE`
-* `DIUN_PROVIDERS_KUBERNETES_CERTAUTHFILEPATH`
-* `DIUN_PROVIDERS_KUBERNETES_TLSINSECURE`
-* `DIUN_PROVIDERS_KUBERNETES_NAMESPACES` (comma separated)
-* `DIUN_PROVIDERS_KUBERNETES_WATCHBYDEFAULT`
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_KUBERNETES_WATCHBYDEFAULT`
## Kubernetes annotations
You can configure more finely the way to analyze the image of your pods through Kubernetes annotations:
-* `diun.enable`: Set to true to enable image analysis of this pod.
-* `diun.regopts_id`: Registry options ID from [`regopts`](../configuration.md#regopts) to use.
-* `diun.watch_repo`: Watch all tags of this pod image (default `false`).
-* `diun.max_tags`: Maximum number of tags to watch if `diun.watch_repo` enabled. 0 means all of them (default `0`).
-* `diun.include_tags`: Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo`.
-* `diun.exclude_tags`: Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo`.
+| Name | Default | Description |
+|-------------------------------|---------------|---------------|
+| `diun.enable` | | Set to true to enable image analysis of this pod |
+| `diun.regopts_id` | | Registry options ID from [`regopts`](../config/regopts.md) to use |
+| `diun.watch_repo` | `false` | Watch all tags of this pod image |
+| `diun.max_tags` | `0` | Maximum number of tags to watch if `diun.watch_repo` enabled. `0` means all of them |
+| `diun.include_tags` | | Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo` |
+| `diun.exclude_tags` | | Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo` |
diff --git a/doc/providers/swarm.md b/docs/providers/swarm.md
similarity index 73%
rename from doc/providers/swarm.md
rename to docs/providers/swarm.md
index b784bf3..1d4a201 100644
--- a/doc/providers/swarm.md
+++ b/docs/providers/swarm.md
@@ -1,12 +1,5 @@
# Swarm provider
-* [About](#about)
-* [Quick start](#quick-start)
-* [Provider configuration](#provider-configuration)
- * [Configuration file](#configuration-file)
- * [Environment variables](#environment-variables)
-* [Docker labels](#docker-labels)
-
## About
The Swarm provider allows you to analyze the services of your Swarm cluster to extract images found and check for updates on the registry.
@@ -98,76 +91,91 @@ diun_diun.1.i1l4yuiafq6y@docker-desktop | Sat, 14 Dec 2019 16:20:02 CET INF N
...
```
-## Provider configuration
+## Configuration
-### Configuration file
+!!! hint
+ Environment variable `DIUN_PROVIDERS_SWARM=true` can be used to enable this provider with default values.
-#### `endpoint`
+### `endpoint`
Server address to connect to. Local if empty.
-```yaml
-providers:
- swarm:
- endpoint: "unix:///var/run/docker.sock"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ swarm:
+ endpoint: "unix:///var/run/docker.sock"
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_SWARM_ENDPOINT`
#### `apiVersion`
Overrides the client version with the specified one.
-```yaml
-providers:
- swarm:
- apiVersion: "1.39"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ swarm:
+ apiVersion: "1.39"
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_SWARM_APIVERSION`
#### `tlsCertsPath`
Path to load the TLS certificates from.
-```yaml
-providers:
- swarm:
- tlsCertsPath: "/certs/"
-```
+!!! example "File"
+ ```yaml
+ providers:
+ swarm:
+ tlsCertsPath: "/certs/"
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_SWARM_TLSCERTSPATH`
#### `tlsVerify`
Controls whether client verifies the server's certificate chain and hostname (default `true`).
-```yaml
-providers:
- swarm:
- tlsVerify: true
-```
+!!! example "File"
+ ```yaml
+ providers:
+ swarm:
+ tlsVerify: true
+ ```
+
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_SWARM_TLSVERIFY`
#### `watchByDefault`
Enable watch by default. If false, services that don't have `diun.enable=true` label will be ignored (default `false`).
-```yaml
-providers:
- swarm:
- watchByDefault: false
-```
+!!! example "File"
+ ```yaml
+ providers:
+ swarm:
+ watchByDefault: false
+ ```
-### Environment variables
+!!! abstract "Environment variables"
+ * `DIUN_PROVIDERS_SWARM_WATCHBYDEFAULT`
-* `DIUN_PROVIDERS_SWARM`
-* `DIUN_PROVIDERS_SWARM_ENDPOINT`
-* `DIUN_PROVIDERS_SWARM_APIVERSION`
-* `DIUN_PROVIDERS_SWARM_TLSCERTSPATH`
-* `DIUN_PROVIDERS_SWARM_TLSVERIFY`
-* `DIUN_PROVIDERS_SWARM_WATCHBYDEFAULT`
## Docker labels
You can configure more finely the way to analyze the image of your service through Docker labels:
-* `diun.enable`: Set to true to enable image analysis of this container.
-* `diun.regopts_id`: Registry options ID from [`regopts`](../configuration.md#regopts) to use.
-* `diun.watch_repo`: Watch all tags of this container image (default `false`).
-* `diun.max_tags`: Maximum number of tags to watch if `diun.watch_repo` enabled. 0 means all of them (default `0`).
-* `diun.include_tags`: Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo`.
-* `diun.exclude_tags`: Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo`.
+| Name | Default | Description |
+|-------------------------------|---------------|---------------|
+| `diun.enable` | | Set to true to enable image analysis of this service |
+| `diun.regopts_id` | | Registry options ID from [`regopts`](../config/regopts.md) to use |
+| `diun.watch_repo` | `false` | Watch all tags of this service image |
+| `diun.max_tags` | `0` | Maximum number of tags to watch if `diun.watch_repo` enabled. `0` means all of them |
+| `diun.include_tags` | | Semi-colon separated list of regular expressions to include tags. Can be useful if you enable `diun.watch_repo` |
+| `diun.exclude_tags` | | Semi-colon separated list of regular expressions to exclude tags. Can be useful if you enable `diun.watch_repo` |
diff --git a/docs/reporting-issue.md b/docs/reporting-issue.md
new file mode 100644
index 0000000..3764fdc
--- /dev/null
+++ b/docs/reporting-issue.md
@@ -0,0 +1,31 @@
+# Reporting an issue
+
+## Before submitting an issue
+
+First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md).
+
+Please do a search in [open issues]({{ config.repo_url }}issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed and read the [FAQ](faq.md) page first.
+
+If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.
+
+:+1: - upvote
+
+:-1: - downvote
+
+If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below.
+
+## Writing good bug reports and feature requests
+
+File a single issue per problem and feature request.
+
+* Do not enumerate multiple bugs or feature requests in the same issue.
+* Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
+
+The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.
+
+You are now ready to [create a new issue]({{ config.repo_url }}issues/new/choose)!
+
+## Closure policy
+
+* Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines.
+* Issues that go a week without a response from original poster are subject to closure at our discretion.
diff --git a/internal/model/regopts.go b/internal/model/regopts.go
index f83469b..f66b28d 100644
--- a/internal/model/regopts.go
+++ b/internal/model/regopts.go
@@ -12,7 +12,7 @@ type RegOpts struct {
UsernameFile string `yaml:"usernameFile,omitempty" json:"usernameFile,omitempty" validate:"omitempty,file"`
Password string `yaml:"password,omitempty" json:"password,omitempty" validate:"omitempty"`
PasswordFile string `yaml:"passwordFile,omitempty" json:"passwordFile,omitempty" validate:"omitempty,file"`
- InsecureTLS *bool `yaml:"insecureTls,omitempty" json:"insecureTls,omitempty" validate:"required"`
+ InsecureTLS *bool `yaml:"insecureTLS,omitempty" json:"insecureTLS,omitempty" validate:"required"`
Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty" validate:"required"`
}
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 0000000..03afcd3
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,108 @@
+site_name: Diun
+site_description: Receive notifications when a Docker image is updated on a Docker registry
+site_author: CrazyMax
+site_url: https://diun.crazymax.dev
+edit_uri: edit/master/www/docs/
+docs_dir: docs
+
+repo_name: crazy-max/diun
+repo_url: https://github.com/crazy-max/diun
+copyright: |
+ Made with
+ by CrazyMax and contributors.
+
+extra:
+ app:
+ version: 4.0.0
+ social:
+ - icon: fontawesome/brands/github-alt
+ link: https://github.com/crazy-max/diun
+
+theme:
+ name: material
+ custom_dir: docs/overrides
+ language: en
+ palette:
+ scheme: default
+ primary: light blue
+ accent: light blue
+ font:
+ text: Roboto
+ code: Roboto Mono
+ i18n:
+ prev: Previous
+ next: Next
+ logo: assets/logo.png
+ favicon: assets/favicon.ico
+ include_search_page: false
+ search_index_only: true
+
+plugins:
+ - macros
+ - search:
+ prebuild_index: python
+ lang:
+ - en
+ - git-revision-date-localized:
+ type: iso_datetime
+ - minify:
+ minify_html: true
+
+google_analytics:
+ - !!python/object/apply:os.getenv ["GOOGLE_ANALYTICS_KEY"]
+ - auto
+
+nav:
+ - Home: index.md
+ - Get started: get-started.md
+ - Installation:
+ - With Docker: install/docker.md
+ - From binary: install/binary.md
+ - Linux service: install/linux-service.md
+ - Configuration:
+ - Overview: config/index.md
+ - .db: config/db.md
+ - .watch: config/watch.md
+ - .notif: config/notif.md
+ - .regopts: config/regopts.md
+ - .providers: config/providers.md
+ - Notifications:
+ - Amqp: notif/amqp.md
+ - Gotify: notif/gotify.md
+ - Mail: notif/mail.md
+ - Rocket.Chat: notif/rocketchat.md
+ - Script: notif/script.md
+ - Slack: notif/slack.md
+ - Teams: notif/teams.md
+ - Telegram: notif/telegram.md
+ - Webhook: notif/webhook.md
+ - Providers:
+ - Docker: providers/docker.md
+ - File: providers/file.md
+ - Kubernetes: providers/kubernetes.md
+ - Swarm: providers/swarm.md
+ - FAQ: faq.md
+ - Migration:
+ - Diun v2 to v3: migration/v2-to-v3.md
+ - Diun v1 to v2: migration/v1-to-v2.md
+ - Diun v0 to v1: migration/v0-to-v1.md
+ - Reporting an issue: reporting-issue.md
+ - Contributing: contributing.md
+ - Donate: donate.md
+
+markdown_extensions:
+ - admonition
+ - codehilite
+ - footnotes
+ - meta
+ - pymdownx.details
+ - pymdownx.tabbed
+ - pymdownx.superfences
+ - pymdownx.emoji:
+ emoji_index: !!python/name:materialx.emoji.twemoji
+ emoji_generator: !!python/name:materialx.emoji.to_svg
+ - toc:
+ permalink: true
+
+extra_css:
+ - css/extra.css