3 files changed
@@ -12,9 +12,8 @@ | |||
| 12 | 12 | from opentelemetry.instrumentation.pymemcache import PymemcacheInstrumentor | |
| 13 | 13 | from opentelemetry.instrumentation.requests import RequestsInstrumentor | |
| 14 | 14 | ||
| 15 | - # Bind all ipv4 interfaces and ipv6 loopback interface. Would prefer to bind all | ||
| 16 | - # ipv6 as well, but something conflicts with [::]:8000. | ||
| 17 | - bind = ["0.0.0.0:8000", "[::1]:8000"] | ||
| 15 | + # Bind all ipv4 interfaces (nginx uses loopback, but k8s health checks don't) | ||
| 16 | + bind = ["0.0.0.0:8001"] | ||
| 18 | 17 | ||
| 19 | 18 | # Disable control socket | |
| 20 | 19 | control_socket_disable = True | |
@@ -1,3 +1,7 @@ | |||
| 1 | + upstream datatracker_backend { | ||
| 2 | + server 127.0.0.1:8001; | ||
| 3 | + } | ||
| 4 | + | ||
| 1 | 5 | server { | |
| 2 | 6 | listen 8000 default_server; | |
| 3 | 7 | listen [::]:8000 default_server; | |
@@ -24,7 +28,7 @@ server { | |||
| 24 | 28 | ||
| 25 | 29 | location / { | |
| 26 | 30 | error_page 502 /502.html; | |
| 27 | - proxy_pass http://localhost:8001/; | ||
| 31 | + proxy_pass http://datatracker_backend/; | ||
| 28 | 32 | proxy_set_header Host localhost:8000; | |
| 29 | 33 | } | |
| 30 | 34 | ||
@@ -1,3 +1,7 @@ | |||
| 1 | + upstream datatracker_backend { | ||
| 2 | + server 127.0.0.1:8000; | ||
| 3 | + } | ||
| 4 | + | ||
| 1 | 5 | server { | |
| 2 | 6 | listen 8080 default_server; | |
| 3 | 7 | server_name _; | |
@@ -22,7 +26,7 @@ server { | |||
| 22 | 26 | proxy_set_header X-Request-Start "t=$${keepempty}msec"; | |
| 23 | 27 | proxy_set_header X-Forwarded-For $${keepempty}proxy_add_x_forwarded_for; | |
| 24 | 28 | proxy_hide_header X-Datatracker-Is-Authenticated; # hide this from the outside world | |
| 25 | - proxy_pass http://localhost:8000; | ||
| 29 | + proxy_pass http://datatracker_backend; | ||
| 26 | 30 | # Set timeouts longer than Cloudflare proxy limits | |
| 27 | 31 | proxy_connect_timeout 60; # nginx default (Cf = 15) | |
| 28 | 32 | proxy_read_timeout 120; # nginx default = 60 (Cf = 100) | |
0 commit comments