Merge branch 'influxdb3'
This commit is contained in:
19
docker/build.sh
Executable file
19
docker/build.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
|
||||
docker-compose stop routermon
|
||||
docker-compose stop upsmon
|
||||
docker container prune
|
||||
|
||||
echo "Building UPSmon"
|
||||
cp ../pyutils/utils.py ../upsmon/
|
||||
docker build --build-arg BUILD_VER=${GIT_HASH} -f ../upsmon/upsmon.Dockerfile -t upsmon:influx3 ../upsmon
|
||||
rm ../upsmon/utils.py
|
||||
|
||||
echo "Building Routermon"
|
||||
cp ../pyutils/utils.py ../routermon/
|
||||
docker build --build-arg BUILD_VER=${GIT_HASH} -f ../routermon/routermon.Dockerfile -t routermon:influx3 ../routermon
|
||||
rm ../routermon/utils.py
|
||||
|
||||
docker-compose up -d
|
||||
@@ -1,18 +1,26 @@
|
||||
services:
|
||||
influxdb2:
|
||||
image: influxdb:2-alpine
|
||||
container_name: edx-influxdb
|
||||
influxdb3:
|
||||
image: influxdb:3-core
|
||||
container_name: edx-influxdb3
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8086:8086
|
||||
- 8181:8181
|
||||
command:
|
||||
- influxdb3
|
||||
- serve
|
||||
- --node-id=influxb-node0
|
||||
- --object-store=file
|
||||
- --data-dir=/var/lib/influxdb3
|
||||
volumes:
|
||||
- type: volume
|
||||
source: influxdb2-data
|
||||
target: /var/lib/influxdb2
|
||||
- type: volume
|
||||
source: influxdb2-config
|
||||
target: /etc/influxdb2
|
||||
|
||||
source: influxdb3-data
|
||||
target: /var/lib/influxdb3
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: edx-grafana
|
||||
@@ -22,40 +30,53 @@ services:
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
depends_on:
|
||||
- influxdb2
|
||||
- influxdb3
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
|
||||
upsmon:
|
||||
image: upsmon:latest
|
||||
image: upsmon:influx3
|
||||
container_name: edx-upsmon
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- influxdb2
|
||||
- influxdb3
|
||||
devices:
|
||||
- /dev/ttyUSB1:/dev/ttyUSB1
|
||||
- /dev/ttyS0:/dev/ttyS0
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
environment:
|
||||
- INTERVAL=5
|
||||
- INFLUXDB_TOKEN=b46xoZRVsQvyGnv8TVMmTDmxT8LZZsi7O_u776MHIxiE9CPh7yHi0iHMOerUT5o1y65MMxeKKA7S-ijQ3elK-g==
|
||||
- INFLUXDB_URL=http://influxdb2:8086
|
||||
- INFLUXDB_ORG=edelweiss
|
||||
- INFLUXDB_BUCKET=theatre
|
||||
- PORT=/dev/ttyUSB1
|
||||
- INFLUXDB_TOKEN=apiv3_tbEpA8JmIRTfr8Wbw9npD79BcMlFsnV4_jhdt-CdUP53Mos61KBODGaggl2g5oKZZvZrZu3e6mpob6zorhEdbg
|
||||
- INFLUXDB_URL=http://influxdb3:8181
|
||||
- INFLUXDB_DATABASE=edelweiss
|
||||
- PORT=/dev/ttyS0
|
||||
- BAUD=2400
|
||||
- LOG_FILE=/tmp/upsmon.log
|
||||
- LOG_FILE_LVL=WARNING
|
||||
- LOG_CLI_LVL=INFO
|
||||
|
||||
|
||||
routermon:
|
||||
image: routermon:latest
|
||||
image: routermon:influx3
|
||||
container_name: edx-routermon
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- influxdb2
|
||||
- influxdb3
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
environment:
|
||||
- INTERVAL=5
|
||||
- INFLUXDB_TOKEN=b46xoZRVsQvyGnv8TVMmTDmxT8LZZsi7O_u776MHIxiE9CPh7yHi0iHMOerUT5o1y65MMxeKKA7S-ijQ3elK-g==
|
||||
- INFLUXDB_URL=http://influxdb2:8086
|
||||
- INFLUXDB_ORG=edelweiss
|
||||
- INFLUXDB_BUCKET=theatre
|
||||
- INFLUXDB_TOKEN=apiv3_tbEpA8JmIRTfr8Wbw9npD79BcMlFsnV4_jhdt-CdUP53Mos61KBODGaggl2g5oKZZvZrZu3e6mpob6zorhEdbg
|
||||
- INFLUXDB_URL=http://influxdb3:8181
|
||||
- INFLUXDB_DATABASE=edelweiss
|
||||
- MIKROTIK_IP=192.168.31.1
|
||||
- MIKROTIK_USER=service
|
||||
- MIKROTIK_PASSWORD=dataservice
|
||||
@@ -63,8 +84,33 @@ services:
|
||||
- LOG_FILE_LVL=WARNING
|
||||
- LOG_CLI_LVL=INFO
|
||||
|
||||
# unifi-controller:
|
||||
# image: lscr.io/linuxserver/unifi-controller:latest
|
||||
# container_name: edx-unifi
|
||||
# environment:
|
||||
# - PUID=1000
|
||||
# - PGID=1000
|
||||
# - MEM_LIMIT=1024 #optional
|
||||
# - MEM_STARTUP=1024 #optional
|
||||
# volumes:
|
||||
# - /var/lib/unifi:/config
|
||||
# ports:
|
||||
# - 8443:8443
|
||||
# - 3478:3478/udp
|
||||
# - 10001:10001/udp
|
||||
# - 8080:8080
|
||||
# - 1900:1900/udp #optional
|
||||
# - 8843:8843 #optional
|
||||
# - 8880:8880 #optional
|
||||
# - 6789:6789 #optional
|
||||
# - 5514:5514/udp #optional
|
||||
# restart: unless-stopped
|
||||
# logging:
|
||||
# driver: "json-file"
|
||||
# options:
|
||||
# max-size: "10m"
|
||||
# max-file: "5"
|
||||
|
||||
volumes:
|
||||
influxdb2-data:
|
||||
influxdb2-config:
|
||||
grafana-data:
|
||||
influxdb3-data:
|
||||
|
||||
Reference in New Issue
Block a user