From b779075ec2636183bc567dc7b9deea17b583b20e Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Wed, 18 Oct 2023 08:07:57 -0300 Subject: [PATCH] feat: no upstream --- nginx.conf.sigil | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 02267c3..9c3fedc 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -90,4 +90,16 @@ server { include /home/dokku/gateway/nginx.conf.d/*.conf; } +{{ end }} + +# Upstream setup +{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }} +upstream {{ $.APP }}-{{ $upstream_port }} { +{{ range $listeners := $.DOKKU_APP_WEB_LISTENERS | split " " }} +{{ $listener_list := $listeners | split ":" }} +{{ $listener_ip := index $listener_list 0 }} +{{ $listener_port := index $listener_list 1 }} + server {{ $listener_ip }}:{{ $upstream_port }}; +{{ end }} +} {{ end }} \ No newline at end of file