1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

Updated: Docs for docker-compose

This commit is contained in:
GoliathLabs
2022-03-03 13:19:56 +01:00
parent 351278ac5e
commit ef06794aed
2 changed files with 8 additions and 13 deletions

View File

@@ -1,10 +0,0 @@
version: "3.8"
services:
bgpalerter:
image: nttgin/bgpalerter:latest
command: run serve -- --d /opt/bgpalerter/volume/
container_name: bgpalerter
volumes:
- "$(pwd)/volume:/opt/bgpalerter/volume"
restart: always

View File

@@ -76,7 +76,7 @@ docker run -i --name bgpalerter \
nttgin/bgpalerter:latest run serve -- --d /opt/bgpalerter/volume/
```
You can also use docker-compose for that:
Alternatively, you can [use docker-compose](https://github.com/docker/compose). Create a file named docker-compose.yml with the following content:
```
version: "3.8"
@@ -90,6 +90,7 @@ services:
- "$(pwd)/volume:/opt/bgpalerter/volume"
restart: always
```
After that you have to invoke `sudo docker-compose up -d` and the container should start up. You might want to have a look at the logs by using `sudo docker-compose logs`.
With this command, a new directory `./volume` will be created in the current position.
Such directory will contain all the persistent data that BGPalerter will generate, including configuration and alert logs.
@@ -111,7 +112,7 @@ docker run -i --name bgpalerter \
nttgin/bgpalerter:latest run serve -- --d /opt/bgpalerter/volume/
```
With docker-compose:
Alternatively, you can [use docker-compose](https://github.com/docker/compose). Create a file named docker-compose.yml with the following content:
```
version: "3.8"
@@ -128,6 +129,8 @@ services:
restart: always
```
After that you have to invoke `sudo docker-compose up -d` and the container should start up. You might want to have a look at the logs by using `sudo docker-compose logs`.
The `uptimeApi` module has to be enabled in `volume/config.yml` as described [here](process-monitors.md).
Now you can monitor `http://127.0.0.1:8011/status` (e.g., in Nagios) to check the status of the BGPalerter monitoring.
Such API may return a negative result when there is a misconfiguration or when BGPalerter failed to connect to the data repository.
@@ -148,7 +151,7 @@ docker run -i --name bgpalerter \
nttgin/bgpalerter:latest run serve -- --d /opt/bgpalerter/volume/
```
With docker-compose:
Alternatively, you can [use docker-compose](https://github.com/docker/compose). Create a file named docker-compose.yml with the following content:
```
version: "3.8"
@@ -170,6 +173,8 @@ services:
retries: 15
```
After that you have to invoke `sudo docker-compose up -d` and the container should start up. You might want to have a look at the logs by using `sudo docker-compose logs`.
> This option does NOT replace [proper monitoring](process-monitors.md).
Just restarting the container will not assure you that the monitoring is working properly or that it will work again. You should always investigate failures and fix possible misconfiguration.