Skip to content

Commit 4456027

Browse files
loomchildJrCs
authored andcommitted
Do not generate certs if LETSENCRYPT_HOST is empty (#183)
1 parent a9b9c74 commit 4456027

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/letsencrypt_service_data.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
LETSENCRYPT_CONTAINERS=({{ range $host, $containers := groupBy $ "Env.LETSENCRYPT_HOST" }}{{ range $container := $containers }} '{{ printf "%.12s" $container.ID }}' {{ end }}{{ end }})
1+
LETSENCRYPT_CONTAINERS=({{ range $hosts, $containers := groupBy $ "Env.LETSENCRYPT_HOST" }}{{ if trim $hosts }}{{ range $container := $containers }} '{{ printf "%.12s" $container.ID }}' {{ end }}{{ end }}{{ end }})
22

33
{{ range $hosts, $containers := groupBy $ "Env.LETSENCRYPT_HOST" }}
44

5+
{{ if trim $hosts }}
6+
57
{{ range $container := $containers }}{{ $cid := printf "%.12s" $container.ID }}
68
LETSENCRYPT_{{ $cid }}_HOST=( {{ range $host := split $hosts "," }}'{{ $host }}' {{ end }})
79
LETSENCRYPT_{{ $cid }}_EMAIL="{{ $container.Env.LETSENCRYPT_EMAIL }}"
810
LETSENCRYPT_{{ $cid }}_TEST="{{ $container.Env.LETSENCRYPT_TEST }}"
911
{{ end }}
1012

1113
{{ end }}
14+
15+
{{ end }}

0 commit comments

Comments
 (0)