]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: update backend method
authorGrant Slater <github@firefishy.com>
Tue, 2 Jul 2024 22:54:55 +0000 (23:54 +0100)
committerGrant Slater <github@firefishy.com>
Tue, 2 Jul 2024 22:54:55 +0000 (23:54 +0100)
cookbooks/imagery/recipes/tiler.rb
cookbooks/imagery/templates/default/nginx_titiler.conf.erb

index 1b86ef6f01cf4a52357699e776fcbde4d5e5f65e..d56357d62f41ea9f37929c3698dde1bead254a7c 100644 (file)
@@ -42,6 +42,7 @@ podman_service "titiler" do
   environment :BIND                                => "unix:/sockets/titiler.sock",
               :WORKERS_PER_CORE                    => 1,
               :GDAL_CACHEMAX                       => 200,
+              :GDAL_BAND_BLOCK_CACHE               => "HASHSET",
               :GDAL_DISABLE_READDIR_ON_OPEN        => "EMPTY_DIR",
               :GDAL_INGESTED_BYTES_AT_OPEN         => 32768,
               :GDAL_HTTP_MERGE_CONSECUTIVE_RANGES  => "YES",
index 191ee495ff533931225c8e093fd609aba1a10c68..ea48a0cec30edec0be829166e1f3dfeb312c2d90 100644 (file)
@@ -15,6 +15,10 @@ server {
     }
 }
 
+upstream titiler_api_backend {
+    server unix:/srv/imagery/sockets/titiler.sock max_fails=0;
+}
+
 server {
     listen 443 ssl http2;
     listen [::]:443 ssl http2;
@@ -46,7 +50,7 @@ server {
 
     location /api/v1/titiler {
       rewrite ^/api/v1/titiler(.*)$ $1 break;
-      proxy_pass unix:/srv/imagery/sockets/titiler.sock;
+      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;