feat: no upstream

This commit is contained in:
Stepan Vladovskiy 2023-10-18 08:06:56 -03:00
parent 45dd51e261
commit 033427d658

View File

@ -47,7 +47,7 @@ server {
# Default location block # Default location block
location / { location / {
proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; proxy_pass http://172.17.0.28:8080;
add_header 'Cache-Control' 'no-cache'; add_header 'Cache-Control' 'no-cache';
add_header 'Content-Type' 'text/event-stream'; add_header 'Content-Type' 'text/event-stream';
add_header 'Connection' 'keep-alive'; add_header 'Connection' 'keep-alive';
@ -90,16 +90,4 @@ server {
include /home/dokku/gateway/nginx.conf.d/*.conf; 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 }} {{ end }}