From 6455292a95e1103224550cbb592d139307a54563 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 5 Apr 2021 04:40:49 +0200 Subject: [PATCH] Update doc --- docs/config/watch.md | 2 +- docs/faq.md | 4 +-- docs/install/binary.md | 26 ++++++++-------- docs/install/docker.md | 36 +++++++++++------------ docs/install/linux-service.md | 6 ++-- docs/usage/basic-example.md | 2 +- docs/usage/cli.md | 2 +- docs/user-guides/docker-file-providers.md | 2 +- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/config/watch.md b/docs/config/watch.md index 8fd23591..960d2e3a 100644 --- a/docs/config/watch.md +++ b/docs/config/watch.md @@ -33,7 +33,7 @@ Maximum number of workers that will execute tasks concurrently. (default `10`) [CRON expression](https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format) to schedule Diun. !!! warning - Remove this setting if you want to run Diun directly. + Remove this setting if you want to run Diun directly. !!! example "Config file" ```yaml diff --git a/docs/faq.md b/docs/faq.md index 1c033b31..d0b56003 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -17,13 +17,13 @@ watch: Through the [command line](usage/cli.md) with: ```shell -$ diun --config ./diun.yml --test-notif +diun --config ./diun.yml --test-notif ``` Or within a container: ```shell -$ docker-compose exec diun diun --test-notif +docker-compose exec diun diun --test-notif ``` ## field docker|swarm uses unsupported type: invalid diff --git a/docs/install/binary.md b/docs/install/binary.md index 6251dcd4..700d2af3 100644 --- a/docs/install/binary.md +++ b/docs/install/binary.md @@ -21,7 +21,7 @@ Choose the archive matching the destination platform: And extract diun: ```shell -$ wget -qO- {{ config.repo_url }}releases/download/v{{ git.tag | trim('v') }}/diun_{{ git.tag | trim('v') }}_linux_x86_64.tar.gz | tar -zxvf - diun +wget -qO- {{ config.repo_url }}releases/download/v{{ git.tag | trim('v') }}/diun_{{ git.tag | trim('v') }}_linux_x86_64.tar.gz | tar -zxvf - diun ``` After getting the binary, it can be tested with [`./diun --help`](../usage/cli.md) command and moved to a permanent location. @@ -35,19 +35,19 @@ Steps below are the recommended server configuration. Create user to run diun (ex. `diun`) ```shell -$ groupadd diun -$ useradd -s /bin/false -d /bin/null -g diun diun +groupadd diun +useradd -s /bin/false -d /bin/null -g diun diun ``` ### Create required directory structure ```shell -$ 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 +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 @@ -55,8 +55,8 @@ $ chmod 770 /etc/diun Create your first [configuration](../config/index.md) file in `/etc/diun/diun.yml` and type: ```shell -$ chown diun:diun /etc/diun/diun.yml -$ chmod 644 /etc/diun/diun.yml +chown diun:diun /etc/diun/diun.yml +chmod 644 /etc/diun/diun.yml ``` !!! note @@ -65,7 +65,7 @@ $ chmod 644 /etc/diun/diun.yml ### Copy binary to global location ```shell -$ cp diun /usr/local/bin/diun +cp diun /usr/local/bin/diun ``` ## Running Diun @@ -79,7 +79,7 @@ See how to create [Linux service](linux-service.md) to start Diun automatically. ### 2. Running from terminal ```shell -$ DIUN_DB_PATH=/var/lib/diun/diun.db /usr/local/bin/diun --config /etc/diun/diun.yml +DIUN_DB_PATH=/var/lib/diun/diun.db /usr/local/bin/diun --config /etc/diun/diun.yml ``` ## Updating to a new version diff --git a/docs/install/docker.md b/docs/install/docker.md index f2f25aa5..fc4b1a09 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -13,7 +13,7 @@ It is possible to always use the latest stable tag or to use another service tha Following platforms for this image are available: -```shell +``` $ docker run --rm mplatform/mquery crazymax/diun:latest Image: crazymax/diun:latest * Manifest List: Yes @@ -70,33 +70,33 @@ services: Edit this example with your preferences and run the following commands to bring up Diun: ```shell -$ docker-compose up -d -$ docker-compose logs -f +docker-compose up -d +docker-compose logs -f ``` Or use the following command: ```shell -$ 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=0 */6 * * *" \ - -e "DIUN_PROVIDERS_DOCKER=true" \ - -e "DIUN_PROVIDERS_DOCKER_WATCHSTOPPED=true" \ - -v "$(pwd)/data:/data" \ - -v "/var/run/docker.sock:/var/run/docker.sock" \ - -l "diun.enable=true" \ - -l "diun.watch_repo=true" \ - crazymax/diun:latest +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=0 */6 * * *" \ + -e "DIUN_PROVIDERS_DOCKER=true" \ + -e "DIUN_PROVIDERS_DOCKER_WATCHSTOPPED=true" \ + -v "$(pwd)/data:/data" \ + -v "/var/run/docker.sock:/var/run/docker.sock" \ + -l "diun.enable=true" \ + -l "diun.watch_repo=true" \ + crazymax/diun:latest ``` To upgrade your installation to the latest release: ```shell -$ docker-compose pull -$ docker-compose up -d +docker-compose pull +docker-compose up -d ``` If you prefer to rely on the configuration file instead of environment variables: diff --git a/docs/install/linux-service.md b/docs/install/linux-service.md index 961cf591..eab43fc4 100644 --- a/docs/install/linux-service.md +++ b/docs/install/linux-service.md @@ -33,12 +33,12 @@ Change the user, group, and other required startup values following your needs. Enable and start Diun at boot: ```shell -$ sudo systemctl enable diun -$ sudo systemctl start diun +sudo systemctl enable diun +sudo systemctl start diun ``` To view logs: ```shell -$ journalctl -fu diun.service +journalctl -fu diun.service ``` diff --git a/docs/usage/basic-example.md b/docs/usage/basic-example.md index 1494a805..38e92044 100644 --- a/docs/usage/basic-example.md +++ b/docs/usage/basic-example.md @@ -32,7 +32,7 @@ your **local Docker** instance **every 6 hours**. That's it. Now you can launch Diun with the following command: ```shell -$ docker-compose up -d +docker-compose up -d ``` If you prefer to rely on the configuration file instead of environment variables: diff --git a/docs/usage/cli.md b/docs/usage/cli.md index 1aaad563..724e313f 100644 --- a/docs/usage/cli.md +++ b/docs/usage/cli.md @@ -3,7 +3,7 @@ ## Usage ```shell -$ diun [options] +diun [options] ``` ## Options diff --git a/docs/user-guides/docker-file-providers.md b/docs/user-guides/docker-file-providers.md index 30cc05df..20455ec5 100644 --- a/docs/user-guides/docker-file-providers.md +++ b/docs/user-guides/docker-file-providers.md @@ -53,5 +53,5 @@ through the [File provider](../providers/file.md) **every 6 hours**. That's it. Now you can launch Diun with the following command: ```shell -$ docker-compose up -d +docker-compose up -d ```