Update nginx to have keepalive connections
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
91c90ac598
commit
8d30463c56
|
@ -2,6 +2,7 @@
|
|||
.env
|
||||
.env.example
|
||||
.gitignore
|
||||
testdata/
|
||||
docker/nginx
|
||||
docker-compose.override.yml
|
||||
p2pool.cache
|
||||
|
|
|
@ -53,7 +53,7 @@ If you want to make changes to additional docker-compose settings, do not edit `
|
|||
### Update / Apply new settings
|
||||
Within the instance folder, run this command
|
||||
```bash
|
||||
$ git pull && docker-compose build --pull && docker-compose up -d && docker-compose restart tor
|
||||
$ git pull && docker-compose build --pull && docker-compose up -d && docker-compose restart tor site pgo-collector
|
||||
```
|
||||
`docker-compose restart tor` is necessary due to the tor server not refreshing DNS of the containers.
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
upstream api-keepalive {
|
||||
server api:8080;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
upstream web-keepalive {
|
||||
server web:8444;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
upstream daemon-keepalive {
|
||||
server daemon:8787;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 fastopen=200 default_server;
|
||||
|
||||
|
@ -48,8 +63,7 @@ server {
|
|||
include snippets/onion-headers.conf;
|
||||
|
||||
location = / {
|
||||
set $backend "http://web:8444";
|
||||
proxy_pass $backend;
|
||||
proxy_pass http://web-keepalive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
|
@ -61,8 +75,7 @@ server {
|
|||
}
|
||||
|
||||
location = /api {
|
||||
set $backend "http://web:8444";
|
||||
proxy_pass $backend;
|
||||
proxy_pass http://web-keepalive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
|
@ -74,8 +87,7 @@ server {
|
|||
}
|
||||
|
||||
location = /api/events {
|
||||
set $backend "http://daemon:8787";
|
||||
proxy_pass $backend;
|
||||
proxy_pass http://daemon-keepalive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
@ -88,8 +100,7 @@ server {
|
|||
|
||||
|
||||
location @web {
|
||||
set $backend "http://web:8444";
|
||||
proxy_pass $backend;
|
||||
proxy_pass http://web-keepalive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
|
@ -102,8 +113,7 @@ server {
|
|||
|
||||
|
||||
location ^~ /api/ {
|
||||
set $backend "http://api:8080";
|
||||
proxy_pass $backend;
|
||||
proxy_pass http://api-keepalive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
|
|
Loading…
Reference in a new issue