From b921aad0b11b24e9c98ae1378630e7c5797de24d Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 5 Jul 2024 11:24:30 +0100 Subject: [PATCH] imagery: add additional upstream to allow backend retry --- cookbooks/imagery/templates/default/nginx_imagery.conf.erb | 1 + cookbooks/imagery/templates/default/nginx_titiler.conf.erb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb index 126c2d117..42ae9ac01 100644 --- a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb @@ -10,6 +10,7 @@ server { <% if @uses_tiler -%> upstream <%= @name %>_tiler_backend { server unix:/srv/imagery/sockets/titiler.sock max_fails=0; + server unix:/srv/./imagery/sockets/titiler.sock max_fails=0; } <% else -%> upstream <%= @name %>_fastcgi { diff --git a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb index ea48a0cec..155620949 100644 --- a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb @@ -17,6 +17,7 @@ server { upstream titiler_api_backend { server unix:/srv/imagery/sockets/titiler.sock max_fails=0; + server unix:/srv/./imagery/sockets/titiler.sock max_fails=0; } server { @@ -50,7 +51,7 @@ server { location /api/v1/titiler { rewrite ^/api/v1/titiler(.*)$ $1 break; - proxy_pass http://titiler_api_backend + proxy_pass http://titiler_api_backend; proxy_set_header Host $host; proxy_set_header Referer $http_referer; proxy_set_header X-Forwarded-For $remote_addr; -- 2.39.5