[ci skip] add nginx upstream and server block for private registry on port 5050
This commit is contained in:
parent
c7bb324f64
commit
64c55a6710
1 changed files with 34 additions and 0 deletions
|
|
@ -48,6 +48,11 @@ http {
|
||||||
keepalive 32;
|
keepalive 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
upstream private {
|
||||||
|
server registry-private:5000;
|
||||||
|
keepalive 32;
|
||||||
|
}
|
||||||
|
|
||||||
# --- Docker Hub (port 5000) ---
|
# --- Docker Hub (port 5000) ---
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|
@ -217,4 +222,33 @@ http {
|
||||||
add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --- Private R/W Registry (port 5050) ---
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 5050;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
client_max_body_size 0;
|
||||||
|
proxy_request_buffering off;
|
||||||
|
proxy_buffering off;
|
||||||
|
chunked_transfer_encoding on;
|
||||||
|
|
||||||
|
location /v2/ {
|
||||||
|
proxy_pass http://private;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
proxy_read_timeout 900;
|
||||||
|
proxy_send_timeout 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 200 'ok';
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue