-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchtower does not restart linked containers #894
Comments
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏 |
It looks like you are using different contexts for django and nginx, is that inentional? |
@piksel yes. The check interval |
I think that might be why it doesn't work, since the target container is not included in the context it has no reference to it and cannot include it in the update/restart list. I don't know enough about how the links are handled internally, though, and looking at the source it's not obvious to me how it works. |
Linked containers that are not in scope won't be included as it's currently implemented. Should it be changed? I don't know. @victorcmoura might have some thoughts on this? |
According to the documentation, watchtower should restart container with the
com.centurylinklabs.watchtower.depends-on
label, but it does not.Background: We try to use watchtower in a CI/CD setup for a django/nginx application. We have a test server that runs a private registry. Watchtower is used to restart services once a new container is pushed to the local registry. Unfortunately, nginx seems to cache domain names, thus we need to restart the nginx service after a django service is restarted, as the internal ip adress of the django container in the docker network might change.
To Reproduce
I created a test setup to reproduce this issue here: https://github.com/rbuffat/watchtower_debug
Watchtower restarts django, but not nginx:
Possible related issues:
#595
The text was updated successfully, but these errors were encountered: