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:
@@ -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
|
|
||||||
@@ -76,7 +76,7 @@ docker run -i --name bgpalerter \
|
|||||||
nttgin/bgpalerter:latest run serve -- --d /opt/bgpalerter/volume/
|
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"
|
version: "3.8"
|
||||||
@@ -90,6 +90,7 @@ services:
|
|||||||
- "$(pwd)/volume:/opt/bgpalerter/volume"
|
- "$(pwd)/volume:/opt/bgpalerter/volume"
|
||||||
restart: always
|
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.
|
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.
|
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/
|
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"
|
version: "3.8"
|
||||||
@@ -128,6 +129,8 @@ services:
|
|||||||
restart: always
|
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).
|
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.
|
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.
|
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/
|
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"
|
version: "3.8"
|
||||||
@@ -170,6 +173,8 @@ services:
|
|||||||
retries: 15
|
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).
|
> 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user