Skip to content
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

feat: allow multiple -notify-sighup / -notify-container #622

Merged
merged 3 commits into from
May 17, 2024
Merged

Conversation

buchdag
Copy link
Member

@buchdag buchdag commented May 17, 2024

The -notify-sighup and -notify-container option were obviously planned to allow them to be passed multiple times, since they're internally stored as a map of container ID (string) to signal (int). This PR make it possible to use both of those options multiple times, like this:

docker-gen \
    -notify-sighup container1 \
    -notify-sighup container2 \
    -notify-container container3 \
    -notify-container container4 \
    -notify-signal 2 \
    ./some/template.tmpl ./result.ext

This would send HUP (1) to container1 and container2 and INT (2) to container3 and container4.

For notifying large amount of containers, the recently added -notify-filter is preferable.

There was also a TODO for preventing duplicate paths being passed to -config that this PR fixes.

@buchdag buchdag self-assigned this May 17, 2024
@buchdag buchdag merged commit 7266981 into main May 17, 2024
3 checks passed
@buchdag buchdag deleted the notify-multi branch May 17, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant