Redeploying network dependent docker stacks if parent container has an update #1344
Unanswered
stunrelay
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently watchtower is unable to update docker stacks which have network dependencies. The "child" containers can update fine however if the "parent" container is updated the child containers will no longer function as a new container ID is assigned to the parent container and the child container can no longer find the old container it is dependent on. This has been discussed elsewhere: #1286.
It would be great if watchtower could update the container ID for each of the child containers dependency after the parent container updates.
OR
Just redeploy the whole docker-compose stack if the parent container needs an update.
The parent container could be flagged with a label to mark it as a dependency to enable this function and child containers could continue being updated as normal.
Not sure if watchtower has access to docker-compose or if it can even interpret currently deployed stacks but...
P.S. thank you everyone who has worked on watchtower thus far!
EDIT:
I have created a simple workaround for this in the meantime by enabling a post-update lifecycle hook which triggers a cron job to redeploy the whole stack if the parent container is updated. A watchtower-based solution would still be much more elegant however.
Beta Was this translation helpful? Give feedback.
All reactions