File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 11LETSENCRYPT_CONTAINERS=(
2- {{ range $hosts, $containers := groupBy $ "Env.LETSENCRYPT_HOST" }}
3- {{ if trim $hosts }}
4- {{ range $container := $containers }}
5- {{ if parseBool (coalesce $container.Env.LETSENCRYPT_SINGLE_DOMAIN_CERTS "false") }}
6- {{/* Explicit per-domain splitting of the certificate */}}
7- {{ range $host := split $hosts "," }}
8- {{ $host := trim $host }}
9- {{- "\t"}}'{{ printf "%.12s" $container.ID }}_{{ sha1 $host }}'
10- {{ end }}
11- {{ else }}
12- {{/* Default: multi-domain (SAN) certificate */}}
13- {{- "\t"}}'{{ printf "%.12s" $container.ID }}'
2+ {{ $orderedContainers := sortObjectsByKeysDesc $ "Created" }}
3+ {{ range $_, $container := whereExist $orderedContainers "Env.LETSENCRYPT_HOST" }}
4+ {{ if trim $container.Env.LETSENCRYPT_HOST }}
5+ {{ if parseBool (coalesce $container.Env.LETSENCRYPT_SINGLE_DOMAIN_CERTS "false") }}
6+ {{/* Explicit per-domain splitting of the certificate */}}
7+ {{ range $host := split $container.Env.LETSENCRYPT_HOST "," }}
8+ {{ $host := trim $host }}
9+ '{{ printf "%.12s" $container.ID }}_{{ sha1 $host }}'
1410 {{ end }}
11+ {{ else }}
12+ {{/* Default: multi-domain (SAN) certificate */}}
13+ {{- "\t"}}'{{ printf "%.12s" $container.ID }}'
1514 {{ end }}
1615 {{ end }}
1716 {{ end }}
You can’t perform that action at this time.
0 commit comments