hunk.code_window:       - IMMICH_SERVER_URL
         - IMMICH_WEB_URL
       ports:
         - 2283:8080
       logging:
         driver: none
       depends_on:
         - immich-server
       restart: always
   volumes:
  
hunk.labels: keep keep keep keep replace replace keep keep keep keep keep
hunk.file_path: docker/docker-compose.yml
hunk.type: replace
file: map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
  }
  
  map $http_x_forwarded_proto $forwarded_protocol {
    default $scheme;
  
    # Only allow the values 'http' and 'https' for the X-Forwarded-Proto header.
    http http;
    https https;
  }
  
  upstream server {
    server ${IMMICH_SERVER_HOST};
    keepalive 2;
  }
  
  upstream web {
    server ${IMMICH_WEB_HOST};
    keepalive 2;
  }
  
  server {
    listen 8080;
  
    access_log off;
    client_max_body_size 50000M;
  
    # Compression
    gzip off;
    gzip_comp_level 2;
    gzip_min_length 1000;
    gzip_proxied any;
    gzip_vary on;
    gunzip on;
  
    # text/html is included by default
    gzip_types
      application/javascript
      application/json
      font/ttf
      image/svg+xml
      text/css;
  
    proxy_buffering off;
    proxy_request_buffering off;
    proxy_buffer_size 16k;
    proxy_busy_buffers_size 24k;
    proxy_buffers 64 4k;
    proxy_force_ranges on;
  
    proxy_http_version 1.1;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $forwarded_protocol;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
  
    location /api {
  
      rewrite /api/(.*) /$1 break;
  
      proxy_pass ${IMMICH_SERVER_SCHEME}server;
    }
  
    location / {
  
      proxy_pass ${IMMICH_WEB_SCHEME}web;
    }
  }
  