Open pirh2o opened 2 years ago
Can you share your deunhealth full logs and docker-compose.yml please?
All my logs are these:
========================================
Running version latest built on 2021-11-28T12:51:56Z (commit 6f26ebf)
🔧 Need help? https://github.com/qdm12/deunhealth/discussions/new 🐛 Bug? https://github.com/qdm12/deunhealth/issues/new ✨ New feature? https://github.com/qdm12/deunhealth/issues/new ☕ Discussion? https://github.com/qdm12/deunhealth/discussions/new 💻 Email? quentin.mcgaw@gmail.com 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12 2022/06/27 18:34:18 INFO healthcheck: listening on 127.0.0.1:9999 2022/06/27 18:34:18 INFO Monitoring 0 containers to restart when becoming unhealthy 2022/06/27 18:34:18 INFO New labeled containers will be automatically detected
And my docker-compose is:
version: "3.7" services: deunhealth: container_name: deunhealth image: qmcgaw/deunhealth volumes:
Thanks again. Regards.
When the label "deunhealth.restart.on.unhealthy" is created manually, it works. The problem is doing one by one for each container.
I have exactly the same issue on Raspberry Pi 3b (ARM_V7). Does not work when labels are created using docker-compose, have to add them manually.
Make sure you are using one of these two modes to add the label in the docker-compose:
...
labels:
deunhealth.restart.on.unhealthy: "true"
...
or
...
labels:
- deunhealth.restart.on.unhealthy=true
...
Do not use this way:
...
labels:
deunhealth.restart.on.unhealthy: true
...
because docker-compose would replace the boolean true with "True"
and that would not work it seems.
Perhaps deunhealth could check for all variants?
Yeah I just had this issue and changing to the string seemed to fix it.
Though it is not obvious why this happens, when running docker container inspect
on the container before and after I see the same output for both. Maybe the api that is used to pull the docker output knows the difference
with boolean true in the label "deunhealth.restart.on.unhealthy": "true",
With string "true" "deunhealth.restart.on.unhealthy": "true",
I've running the latest version of deunhelath in a docker container through docker-compose stack. The version of docker and compose are the latest as well. In the stacks of the containers that I want to restart when becoming unhealthy, I've added the label as follows:
Despite the containers work fine and labels have been added correctly, deunhealth does not seem to recognise the labels, being the deunhealth's log as follows:
I don't know if I'm doing something wrong.
Thanks in advance.