tests: add unit tests and support multiple routers/services in traefik

This commit is contained in:
Jose Diaz-Gonzalez
2022-08-18 11:13:34 -04:00
parent 801fc5d78c
commit c9caa0880f
2 changed files with 85 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ trigger-traefik-vhosts-docker-args-process-deploy() {
output="$output --label traefik.http.services.$APP-$PROC_TYPE.loadbalancer.server.port=$proxy_container_http_port"
output="$output --label traefik.http.routers.$APP-$PROC_TYPE.entrypoints=http"
output="$output --label traefik.http.routers.$APP-$PROC_TYPE.service=$APP-$PROC_TYPE"
if [[ -n "$traefik_domains" ]]; then
output="$output --label \"traefik.http.routers.$APP-$PROC_TYPE.rule=Host(\\\`$traefik_domains\\\`)\""
echo "# THIS FILE IS GENERATED BY DOKKU - DO NOT EDIT, YOUR CHANGES WILL BE OVERWRITTEN" >"$app_urls_path"
@@ -107,6 +108,7 @@ trigger-traefik-vhosts-docker-args-process-deploy() {
output="$output --label traefik.http.services.$APP-$PROC_TYPE-https.loadbalancer.server.port=$proxy_container_https_port"
output="$output --label traefik.http.routers.$APP-$PROC_TYPE-https.entrypoints=https"
output="$output --label traefik.http.routers.$APP-$PROC_TYPE-https.service=$APP-$PROC_TYPE-https"
if [[ -n "$traefik_domains" ]]; then
output="$output --label \"traefik.http.routers.$APP-$PROC_TYPE-https.rule=Host(\\\`$traefik_domains\\\`)\""
echo "# THIS FILE IS GENERATED BY DOKKU - DO NOT EDIT, YOUR CHANGES WILL BE OVERWRITTEN" >"$app_urls_path"