File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,11 @@ server {
81
81
82
82
{{ range $project, $projContainers := groupByLabel $ "com.docker.compose.project" }}
83
83
{{ range $service, $containers := groupByLabel $projContainers "com.docker.compose.service" }}
84
- {{ $container := first $containers }}
85
84
{{ $host := printf "%s.%s.%s" $service $project "docker" }}
86
- {{ template "server" (dict "Containers" $containers "Host" $host) }}
85
+ {{/* Don't create the implicit host if an explicit VIRTUAL_HOST with the same name has been defined */}}
86
+ {{ if eq 0 (len (where $ "Env.VIRTUAL_HOST" $host)) }}
87
+ {{ $container := first $containers }}
88
+ {{ template "server" (dict "Containers" $containers "Host" $host) }}
89
+ {{ end }}
87
90
{{ end }}
88
91
{{ end }}
You can’t perform that action at this time.
0 commit comments