Update doc

This commit is contained in:
CrazyMax
2021-04-05 04:40:49 +02:00
parent c90557ea0c
commit 6455292a95
8 changed files with 40 additions and 40 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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
```

View File

@@ -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:

View File

@@ -3,7 +3,7 @@
## Usage
```shell
$ diun [options]
diun [options]
```
## Options

View File

@@ -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
```