mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(nginx): Enable upstream keepalive (#1206)
* Enable keepalive * Adapt envsubst * Fix shellcheck issues * Lower connection count
This commit is contained in:
@@ -26,6 +26,16 @@ http {
|
||||
# worker_connections 1000;
|
||||
# }
|
||||
|
||||
upstream server {
|
||||
server $IMMICH_SERVER_HOST
|
||||
keepalive 2
|
||||
}
|
||||
|
||||
upstream web {
|
||||
server $IMMICH_WEB_HOST
|
||||
keepalive 2
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
gzip on;
|
||||
@@ -61,7 +71,7 @@ http {
|
||||
|
||||
rewrite /api/(.*) /$1 break;
|
||||
|
||||
proxy_pass $IMMICH_SERVER_URL;
|
||||
proxy_pass ${IMMICH_SERVER_SCHEME}server;
|
||||
}
|
||||
|
||||
location / {
|
||||
@@ -86,7 +96,7 @@ http {
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_pass $IMMICH_WEB_URL;
|
||||
proxy_pass ${IMMICH_WEB_SCHEME}web;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user