Skip to content

Commit

Permalink
Merge branch 'main' into OZ-196
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruhanga authored Jan 10, 2024
2 parents 0c72e68 + 2d03391 commit ea47b07
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
45 changes: 18 additions & 27 deletions proxy/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ upstream backend {
server openmrs:8080 max_fails=0;
}

upstream odoo {
server odoo:8069 max_fails=0;
}
upstream odoochat {
server odoo:8072 max_fails=0;
}



upstream senaite {
server senaite:8080 max_fails=0;
}

upstream superset {
server superset:8088 max_fails=0;
}

server {
listen 80;

Expand Down Expand Up @@ -139,18 +122,22 @@ server {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
set $odoo odoo:8069;
proxy_pass http://$odoo;
}

location / {
proxy_pass http://odoo;
# The following makes the timeout broader
proxy_read_timeout 30000;
proxy_redirect off;

set $odoo odoo:8069;
proxy_pass http://$odoo;
# The following makes the timeout broader
proxy_read_timeout 30000;
proxy_redirect off;
}

location /longpolling {
proxy_pass http://odoochat;
set $odoo odoo:8072;
proxy_pass http://$odoo;
}
}

Expand All @@ -159,7 +146,8 @@ server {
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://superset;
set $superset superset:8088;
proxy_pass http://$superset;
}
}

Expand All @@ -170,17 +158,20 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /VirtualHostBase/https/$host/senaite/VirtualHostRoot/$1 break;
proxy_pass http://senaite;
set $senaite senaite:8080;
proxy_pass http://$senaite;
}
}


server {
listen 8081;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^(.*)$ /VirtualHostBase/http/$host/senaite/VirtualHostRoot/$1 break;
proxy_pass http://senaite;
set $senaite senaite:8080;
proxy_pass http://$senaite;
}
}
}
1 change: 1 addition & 0 deletions proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ http {
tcp_nodelay on;

keepalive_timeout 65;
resolver 127.0.0.11;

include /etc/nginx/conf.d/*.conf;
}

0 comments on commit ea47b07

Please sign in to comment.