Skip to content

Commit

Permalink
Update docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
awaescher authored Oct 9, 2024
1 parent fd7656a commit 8c41d53
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion usage-with-docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -35,4 +53,4 @@ services:
- prometheus
volumes:
- ./volumes/grafana:/var/lib/grafana
restart: always
restart: always

0 comments on commit 8c41d53

Please sign in to comment.