From: Grant Slater Date: Fri, 5 Jul 2024 10:24:30 +0000 (+0100) Subject: imagery: add additional upstream to allow backend retry X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/b921aad0b11b24e9c98ae1378630e7c5797de24d?hp=891a36508c7c3bbfe041cb0dd1a39c2f84d0f9ff imagery: add additional upstream to allow backend retry --- 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;