20 Commits

Author SHA1 Message Date
d61adc231e .. 2025-10-02 22:26:33 +02:00
917d883d51 sono stupido 2025-10-02 22:22:57 +02:00
e3be103de6 Fid data rate calculation 2025-10-02 21:58:12 +02:00
60b658e837 Updated docker compose 2025-10-01 16:43:32 +02:00
f17e6ef863 cose non cose 2025-06-12 11:28:52 +02:00
71880fc66b Fix import e file 2025-06-12 01:14:24 +02:00
d37fbb64a1 Fix ownership seriale 2025-06-12 01:11:41 +02:00
438523a811 dataclasses per upsmon 2025-06-12 00:55:50 +02:00
530755db90 Fixato per usare porta seriale motherboard 2025-06-10 16:37:12 +02:00
2b6af1ca7a Salva anche l counter dati per ogni interfaccia 2025-06-05 09:38:34 +02:00
fcdd94c94b right strip response end of line 2025-06-04 22:19:42 +02:00
3ff8edfd3a Ottimizzato script build 2025-06-03 19:15:01 +02:00
4acfbb80dd Aggiunta temperatura CPU 2025-06-03 19:08:42 +02:00
0d34d7cb0d Fix Build e domenticanza nel routermon 2025-06-01 10:26:11 +02:00
8aad6a6936 Automazione build e deploy 2025-06-01 10:15:04 +02:00
021b7e70af Refactoring funzioni di utility 2025-06-01 10:14:46 +02:00
676918e686 Refactoring funzione convert_int 2025-05-31 19:01:17 +02:00
b346279b04 Fix codice duplicato e errato reset vettore punti 2025-05-31 18:46:13 +02:00
08020ef3ce Rimossi volumi docker inutilizzati 2025-05-31 16:02:30 +02:00
25536e0842 Cambio versione a influxdb3 per usare InfluxQL per le query 2025-05-31 15:48:46 +02:00
3 changed files with 23 additions and 31 deletions

19
docker/build.sh Executable file
View 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

View File

@@ -1,13 +0,0 @@
#!/bin/bash
GIT_HASH=$(git rev-parse --short HEAD)
cp ../pyutils/utils.py ../upsmon/
cp ../pyutils/utils.py ../routermon/
docker compose build --build-arg BUILD_VER=${GIT_HASH}
rm ../upsmon/utils.py
rm ../routermon/utils.py
docker compose up -d

View File

@@ -3,10 +3,6 @@ services:
image: influxdb:3-core
container_name: edx-influxdb3
restart: unless-stopped
ulimits:
nofile:
soft: 65536
hard: 65536
ports:
- 8181:8181
command:
@@ -42,12 +38,7 @@ services:
max-file: "5"
upsmon:
build:
context: ../upsmon
dockerfile: ../upsmon/upsmon.Dockerfile
args:
BUILD_VER:
#image: upsmon:influx3
image: upsmon:influx3
container_name: edx-upsmon
restart: unless-stopped
depends_on:
@@ -63,7 +54,7 @@ services:
- INTERVAL=5
- INFLUXDB_TOKEN=apiv3_tbEpA8JmIRTfr8Wbw9npD79BcMlFsnV4_jhdt-CdUP53Mos61KBODGaggl2g5oKZZvZrZu3e6mpob6zorhEdbg
- INFLUXDB_URL=http://influxdb3:8181
- INFLUXDB_DATABASE=edelweiss30d
- INFLUXDB_DATABASE=edelweiss
- PORT=/dev/ttyS0
- BAUD=2400
- LOG_FILE=/tmp/upsmon.log
@@ -71,12 +62,7 @@ services:
- LOG_CLI_LVL=INFO
routermon:
build:
context: ../routermon
dockerfile: ../routermon/routermon.Dockerfile
args:
BUILD_VER:
#image: routermon:influx3
image: routermon:influx3
container_name: edx-routermon
restart: unless-stopped
depends_on:
@@ -90,7 +76,7 @@ services:
- INTERVAL=5
- INFLUXDB_TOKEN=apiv3_tbEpA8JmIRTfr8Wbw9npD79BcMlFsnV4_jhdt-CdUP53Mos61KBODGaggl2g5oKZZvZrZu3e6mpob6zorhEdbg
- INFLUXDB_URL=http://influxdb3:8181
- INFLUXDB_DATABASE=edelweiss30d
- INFLUXDB_DATABASE=edelweiss
- MIKROTIK_IP=192.168.31.1
- MIKROTIK_USER=service
- MIKROTIK_PASSWORD=dataservice