Skip to content

Commit 338fd6b

Browse files
authored
Merge pull request #415 from krystal/podman-bugfix
Add ability to not send scopes as a filter with event listener
2 parents 64f6eec + 013f2c6 commit 338fd6b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ CADDY_DOCKER_MODE=<string>
521521
CADDY_DOCKER_POLLING_INTERVAL=<duration>
522522
CADDY_DOCKER_PROCESS_CADDYFILE=<bool>
523523
CADDY_DOCKER_PROXY_SERVICE_TASKS=<bool>
524+
CADDY_DOCKER_NO_SCOPE=<bool, default scope used>
524525
```
525526
526527
Check **examples** folder to see how to set them on a Docker Compose file.

loader.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ func (dockerLoader *DockerLoader) monitorEvents() {
168168

169169
func (dockerLoader *DockerLoader) listenEvents() {
170170
args := filters.NewArgs()
171-
args.Add("scope", "swarm")
172-
args.Add("scope", "local")
171+
if !isTrue.MatchString(os.Getenv("CADDY_DOCKER_NO_SCOPE")) {
172+
// This env var is useful for Podman where in some instances the scope can cause some issues.
173+
args.Add("scope", "swarm")
174+
args.Add("scope", "local")
175+
}
173176
args.Add("type", "service")
174177
args.Add("type", "container")
175178
args.Add("type", "config")

0 commit comments

Comments
 (0)