Merge pull request #194 from replicatedhq/joshs/nginx-and-zot-tweaks

Nginx config updates and zot extended timeouts
This commit is contained in:
Josh Sandlin
2026-07-31 17:15:57 -04:00
committed by GitHub
4 changed files with 20 additions and 18 deletions
+15 -5
View File
@@ -17,15 +17,12 @@ server {
# Next.js web app
location / {
proxy_pass http://127.0.0.1:3000;
proxy_pass http://ttlsh_web;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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;
proxy_cache_bypass $http_upgrade;
}
# Block listing catalog
@@ -41,12 +38,25 @@ server {
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;
send_timeout 3600s;
proxy_pass http://127.0.0.1:5000;
proxy_pass http://ttlsh_zot;
proxy_set_header X-Forwarded-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;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_request_buffering off;
}
}
upstream ttlsh_zot {
server 127.0.0.1:5000;
keepalive 64;
keepalive_timeout 60s;
}
upstream ttlsh_web {
server 127.0.0.1:3000;
keepalive 32;
keepalive_timeout 60s;
}
+3 -1
View File
@@ -37,7 +37,9 @@
"http": {
"address": "0.0.0.0",
"port": "5000",
"compat": ["docker2s2"]
"compat": ["docker2s2"],
"readTimeout": "3600s",
"writeTimeout": "3600s"
},
"log": {
"level": "warn"
+1 -7
View File
@@ -23,9 +23,6 @@ services:
- "127.0.0.1:5000:5000"
volumes:
- ./zot-config.json:/etc/zot/config.json:ro
# Registry blobs live on the host, not in the container layer. Docker
# creates this directory on first start; zot runs as root so no chown
# dance is needed. Path matches storage.rootDirectory in zot-config.json.
- ./zot-data:/var/lib/zot
networks:
- ttlsh-network
@@ -55,7 +52,7 @@ services:
restart: always
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
- ./redis-data:/data
networks:
- ttlsh-network
healthcheck:
@@ -68,6 +65,3 @@ services:
networks:
ttlsh-network:
driver: bridge
volumes:
redis-data:
+1 -5
View File
@@ -21,11 +21,7 @@ func New(baseURL string) *Client {
return &Client{
baseURL: baseURL,
http: &http.Client{
// A manifest delete is a metadata operation against a zot running
// alongside this process, so it should be fast. Failing quickly
// keeps one wedged tag from stalling the rest of the sweep; the row
// stays in the store and is retried on the next tick.
Timeout: 5 * time.Second,
Timeout: 30 * time.Second,
},
}
}