Changeset View
Changeset View
Standalone View
Standalone View
docker/conf/nginx.conf
Show All 13 Lines | http { | ||||
sendfile on; | sendfile on; | ||||
keepalive_timeout 65; | keepalive_timeout 65; | ||||
# Built-in Docker resolver. Needed to allow on-demand resolution of proxy | # Built-in Docker resolver. Needed to allow on-demand resolution of proxy | ||||
# upstreams. | # upstreams. | ||||
resolver 127.0.0.11 valid=30s; | resolver 127.0.0.11 valid=30s; | ||||
server { | server { | ||||
listen 5080 default_server; | listen 80 default_server; | ||||
# Add a trailing slash to top level requests (e.g. http://localhost:5080/flower) | # Add a trailing slash to top level requests (e.g. http://localhost:5080/flower) | ||||
rewrite ^/([^/]+)$ /$1/ permanent; | rewrite ^/([^/]+)$ /$1/ permanent; | ||||
# In this pile of proxies, all upstreams are set using a variable. This | # In this pile of proxies, all upstreams are set using a variable. This | ||||
# makes nginx DNS-resolve the name of the upstream when clients request | # makes nginx DNS-resolve the name of the upstream when clients request | ||||
# them, rather than on start. This avoids an unstarted container preventing | # them, rather than on start. This avoids an unstarted container preventing | ||||
Show All 13 Lines | location /flower/ { | ||||
proxy_set_header Host $host; | proxy_set_header Host $host; | ||||
proxy_redirect off; | proxy_redirect off; | ||||
proxy_http_version 1.1; | proxy_http_version 1.1; | ||||
proxy_set_header Upgrade $http_upgrade; | proxy_set_header Upgrade $http_upgrade; | ||||
proxy_set_header Connection "upgrade"; | proxy_set_header Connection "upgrade"; | ||||
} | } | ||||
location /rabbitmq/ { | location /rabbitmq/ { | ||||
set $upstream "http://amqp:15672"; | set $upstream "http://amqp:15672"; | ||||
rewrite ^ $request_uri; | rewrite ^ $request_uri; | ||||
rewrite ^/rabbitmq(/.*)$ $1 break; | rewrite ^/rabbitmq(/.*)$ $1 break; | ||||
proxy_pass $upstream$uri; | proxy_pass $upstream$uri; | ||||
} | } | ||||
location /scheduler { | location /scheduler { | ||||
set $upstream "http://swh-scheduler:5008"; | set $upstream "http://swh-scheduler:5008"; | ||||
rewrite ^/scheduler/(.*)$ /$1 break; | rewrite ^/scheduler/(.*)$ /$1 break; | ||||
proxy_pass $upstream; | proxy_pass $upstream; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |