test: ensure that the worker upstream exists

This commit is contained in:
Jose Diaz-Gonzalez
2020-03-13 12:42:42 -04:00
parent 38a13ecd39
commit c4b8bd8da9
2 changed files with 24 additions and 1 deletions

View File

@@ -430,6 +430,14 @@ upstream {{ $.APP }}-{{ \$upstream_port }} {
server {{ \$listener_ip }}:{{ \$upstream_port }};{{ end }}
}
{{ end }}{{ end }}
{{ if $.DOKKU_APP_WORKER_LISTENERS }}
{{ range \$upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
upstream {{ $.APP }}-worker-{{ \$upstream_port }} {
{{ range \$listeners := $.DOKKU_APP_WORKER_LISTENERS | split " " }}
server {{ \$listeners }};{{ end }}
}
{{ end }}{{ end }}
EOF
cat "$APP_REPO_DIR/nginx.conf.sigil"
}