From 8c41d53590ccedd0e91f5cacd57d4afadf113199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=A4scher?= Date: Wed, 9 Oct 2024 17:32:05 +0200 Subject: [PATCH] Update docker-compose.yml --- usage-with-docker-compose/docker-compose.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/usage-with-docker-compose/docker-compose.yml b/usage-with-docker-compose/docker-compose.yml index 4cb7a50..c7fedd8 100644 --- a/usage-with-docker-compose/docker-compose.yml +++ b/usage-with-docker-compose/docker-compose.yml @@ -7,6 +7,24 @@ services: env_file: - maxpower.env restart: always + + # I found that the inverters turned inaccessible after ~24 hours of running MaxPower. + # Strangely enough, only restarting the MaxPower-container fixed it. + # I checked the code but could not find any leaks or possible connection issues. + # That's why I went with the crowbar tactic and added this additional docker container + # that restarts the MaxPower-container regularly. You might need it too. + restarter: + image: docker:cli + restart: unless-stopped + volumes: ["/var/run/docker.sock:/var/run/docker.sock"] + entrypoint: ["/bin/sh","-c"] + command: + - | + while true; do + echo "Restarting MaxPower ..." + docker restart maxpower + sleep 3600 + done prometheus: image: prom/prometheus:latest @@ -35,4 +53,4 @@ services: - prometheus volumes: - ./volumes/grafana:/var/lib/grafana - restart: always \ No newline at end of file + restart: always