Aggiornamento docker-compose.yml per configurazione attuale
Build Docker Image for Raspberry Pi / build-and-push (push) Has been cancelled
Build Docker Image for Raspberry Pi / build-and-push (push) Has been cancelled
- Cambiata immagine: gitea.home-nas-ds.org/alessio/docker-voltronic-homeassistant:latest - Aggiunta password MQTT corretta (non più placeholder) - Aggiunto volume voltronic-cache per persistenza discovery - Commentato watchtower (opzionale) - Corretti commenti per chiarire uso ENV variables: * ENV sovrascrivono mqtt.json all'avvio automaticamente * Config volume mantiene calibration e buffer sizes * Cache volume evita re-discovery ad ogni restart - Dockerfile build option usa multiarch invece di dev
This commit is contained in:
+21
-23
@@ -2,33 +2,31 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
voltronic-mqtt:
|
voltronic-mqtt:
|
||||||
|
# Immagine custom da Gitea registry
|
||||||
# We're now (finally) supporting Multi-Arch builds (via Github actions) on Docker Hub!
|
image: gitea.home-nas-ds.org/alessio/docker-voltronic-homeassistant:latest
|
||||||
image: bushrangers/ha-voltronic-mqtt
|
|
||||||
|
|
||||||
# Uncomment if you want to build your own local version.
|
# Uncomment if you want to build your own local version.
|
||||||
#build:
|
#build:
|
||||||
# context: .
|
# context: .
|
||||||
# dockerfile: Dockerfile.dev
|
# dockerfile: Dockerfile.multiarch
|
||||||
|
|
||||||
|
|
||||||
container_name: voltronic-mqtt
|
container_name: voltronic-mqtt
|
||||||
|
|
||||||
privileged: true
|
privileged: true
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# Environment variables for auto-discovery
|
# Environment variables - configurano automaticamente mqtt.json e inverter.conf
|
||||||
environment:
|
environment:
|
||||||
# Device configuration
|
# Device configuration
|
||||||
- INVERTER_DEVICE=/dev/ttyUSB0
|
- INVERTER_DEVICE=/dev/ttyUSB0
|
||||||
|
|
||||||
# MQTT Broker configuration
|
# MQTT Broker configuration (questi valori sovrascrivono mqtt.json all'avvio)
|
||||||
- MQTT_SERVER=192.168.1.37
|
- MQTT_SERVER=192.168.1.37
|
||||||
- MQTT_PORT=1883
|
- MQTT_PORT=1883
|
||||||
- MQTT_TOPIC=homeassistant
|
- MQTT_TOPIC=homeassistant
|
||||||
- MQTT_DEVICENAME=voltronic
|
- MQTT_DEVICENAME=voltronic
|
||||||
- MQTT_USERNAME=mqtt_user
|
- MQTT_USERNAME=mqtt_user
|
||||||
- MQTT_PASSWORD=your_password_here
|
- MQTT_PASSWORD=3tUhCpuDs43e#@k
|
||||||
|
|
||||||
# Auto-discovery options
|
# Auto-discovery options
|
||||||
# Force auto-discovery on every container start (default: false)
|
# Force auto-discovery on every container start (default: false)
|
||||||
@@ -40,33 +38,33 @@ services:
|
|||||||
- SKIP_DISCOVERY=false
|
- SKIP_DISCOVERY=false
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
# Configurazione persistente (buffer sizes, calibration factors)
|
||||||
- ./config/:/etc/inverter/
|
- ./config/:/etc/inverter/
|
||||||
|
|
||||||
devices:
|
# Cache discovery per evitare re-discovery ad ogni restart
|
||||||
# - "/dev/mem:/dev/mem"
|
- voltronic-cache:/cache/
|
||||||
|
|
||||||
|
devices:
|
||||||
# USB Port Mapping
|
# USB Port Mapping
|
||||||
- /dev/bus/usb:/dev/bus/usb:rwm
|
- /dev/bus/usb:/dev/bus/usb:rwm
|
||||||
- /dev/ttyUSB0:/dev/ttyUSB0:rwm
|
- /dev/ttyUSB0:/dev/ttyUSB0:rwm
|
||||||
- /dev/ttyUSB1:/dev/ttyUSB1:rwm
|
- /dev/ttyUSB1:/dev/ttyUSB1:rwm
|
||||||
|
|
||||||
# Serial Port Mapping...
|
# Serial Port Mapping (optional, se usi RS232 nativo)
|
||||||
- /dev/ttyS0:/dev/ttyS0
|
- /dev/ttyS0:/dev/ttyS0
|
||||||
- /dev/ttyS1:/dev/ttyS1
|
- /dev/ttyS1:/dev/ttyS1
|
||||||
- /dev/ttyS2:/dev/ttyS2
|
- /dev/ttyS2:/dev/ttyS2
|
||||||
|
|
||||||
# Used to auto-update images as we release new versions...
|
# Used to auto-update images as we release new versions...
|
||||||
watchtower:
|
# watchtower:
|
||||||
# Please see the following for configuration options:
|
# image: containrrr/watchtower
|
||||||
# https://containrrr.github.io/watchtower/container-selection/
|
# container_name: watchtower
|
||||||
image: containrrr/watchtower
|
# restart: always
|
||||||
container_name: watchtower
|
# privileged: true
|
||||||
|
# volumes:
|
||||||
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# command: --interval 500
|
||||||
|
|
||||||
restart: always
|
volumes:
|
||||||
privileged: true
|
voltronic-cache:
|
||||||
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
command: --interval 500
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user