Skip Navigation

How to trigger a container restart based on successful update/image change of another container?

Basically have watchtower monitor and update containers whenever new images are released. I've recently noticed that with searxng (using redis as db), hosted through nginx proxy manager, will have a steady downtime of about 15mins post update then come back online.

This is extremely frequent for searxng's case as I have watchtower run every day and my preferred way of running most of my containers is with the latest tag. The way out of this downtime in my experience is a restart of NPM which brings back the searxng service.

I'm looking for a way to automate a restart of the NPM container after a successful update of searxng's container.

I have checked the docs for watchtower, and the lifecycle hooks (a way to run sh scripts pre/post update) are able to run only from the applied container and not from the host system.

12

You're viewing a single thread.