cascandaliato / docker-restarter

MIT License
12 stars 0 forks source link

it stops when defined inside a docker compose stack #2

Closed cascandaliato closed 9 months ago

cascandaliato commented 9 months ago

In qdm12/gluetun#641, @Blavkentropy1 said:

I did find I had to put it outside of the stack. Your container would attempt to restart itself. But actually stop if it was inside the stack, and not restart the other container's. Possibly a issue from my side thought

cascandaliato commented 9 months ago

@Blavkentropy1, did you possibly add a depends_on to the restarter itself? Could you share the container logs (docker logs restarter) if you happen to replicate the problem?

Blavkentropy1 commented 9 months ago

Hi @cascandaliato

Thanks for your time and container, I have attempted to replicate the original issue. Unfortunately I cant.. I'm happy to do any testing to replicate this though.

I was one foot out the door when I hit the issue, and I moved restarter outside the stack to test is when I got home.

Below is my Stack that I had the issue with, I don't believe I had the "Depends_on" tag in there. Though It would make sense if I did.

I do recall seeing something along the lines of " Restarting the following container(s) in 10 seconds because container gluetun (re)started: autobrr, flaresolverr, prowlarr, restarter" in the logs, and "restarter" container just stopping and not restarting the effected containers.

My Setup OS: Debian 12.1 Docker: 24.0.6 Built in Portainer Business 2.19.1

`version: "3" services: gluetun: image: qmcgaw/gluetun restart: "unless-stopped" container_name: gluetun cap_add:

volumes: prowlarr: autobrr:`

cascandaliato commented 9 months ago

Please try moving it back inside the docker compose yaml and let me know. I tried adding restart: "unless-stopped" to my services thinking it was going to interfere but I could not replicate the problem.

It will be useful to get the container logs. At start-up it should print the list of dependencies:

Container torrent depends on service vpn
...
Blavkentropy1 commented 9 months ago

Hi @cascandaliato

I have moved the config back inside the stack, and I cant replicate the issue now. I'm happy for this to be closed. If I do manage to get this again, I will re-open a ticket.