From 653321818dac26e416d1670f10aff65537bb3825 Mon Sep 17 00:00:00 2001 From: Timothy Kim Date: Tue, 14 Apr 2026 15:46:48 -0400 Subject: [PATCH] fix immich --- docker/immich/compose.yaml | 10 ++++++++-- docker/nginx/conf.d/photos.thekims.family.conf | 18 +++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docker/immich/compose.yaml b/docker/immich/compose.yaml index 0b827a5..256fb62 100644 --- a/docker/immich/compose.yaml +++ b/docker/immich/compose.yaml @@ -22,8 +22,9 @@ services: - /etc/localtime:/etc/localtime:ro env_file: - .env - ports: - - '2283:2283' + networks: + - default + - shared depends_on: - redis - database @@ -74,3 +75,8 @@ services: volumes: model-cache: + +networks: + default: + shared: + external: true diff --git a/docker/nginx/conf.d/photos.thekims.family.conf b/docker/nginx/conf.d/photos.thekims.family.conf index 08ea460..47b2afd 100644 --- a/docker/nginx/conf.d/photos.thekims.family.conf +++ b/docker/nginx/conf.d/photos.thekims.family.conf @@ -1,10 +1,3 @@ -# Template for new app confs. -# 1. Copy this file: cp _template.conf.example .conf -# 2. Replace photos.thekims.family with the actual domain -# 3. Replace UPSTREAM_NAME and CONTAINER:PORT with the app's container and port -# 4. Run issue-cert.sh if cert doesn't exist yet -# 5. Copy to argento, nginx -t && nginx -s reload - server { listen 80; listen [::]:80; @@ -30,17 +23,20 @@ server { include /etc/nginx/conf.d/security-headers.inc; - # Use a variable so nginx starts even if the upstream is down - set $upstream_UPSTREAM_NAME http://localhost:2283; + # Immich allows large originals and video uploads + client_max_body_size 50G; + proxy_request_buffering off; + + set $upstream_immich http://immich_server:2283; location / { - proxy_pass $upstream_UPSTREAM_NAME; + proxy_pass $upstream_immich; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - # Uncomment if the app uses WebSockets + # Immich uses WebSockets for live upload progress and notifications proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";