Skip to content

Commit

Permalink
feat: proxy requests to obwatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Aug 2, 2022
1 parent a3ad9bd commit 0298b0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions standalone/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ upstream jmwalletd_ws_backend {
keepalive 2;
}

upstream obwatch_backend {
zone upstreams;
server 127.0.0.1:62601;
keepalive 2;
}

server {
listen 80;
listen [::]:80;
Expand Down Expand Up @@ -70,4 +76,19 @@ server {

proxy_pass https://jmwalletd_ws_backend/;
}

location /obwatch/ {
include /etc/nginx/snippets/proxy-params.conf;

proxy_http_version 1.1;
proxy_set_header Connection "";

# allow 5 min (default is 60 sec). increase on demand.
proxy_read_timeout 300s;
# allow 5 min to connect (default is 60 sec)
proxy_connect_timeout 300s;

# must proxy via "http" as ob-watcher does not make use of self-signed cert yet
proxy_pass http://obwatch_backend/;
}
}
2 changes: 1 addition & 1 deletion standalone/supervisor-conf/ob-watcher.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:ob-watcher]
directory=/src/scripts/obwatch
command=python ob-watcher.py --host 0.0.0.0
command=python ob-watcher.py --host=127.0.0.1
autostart=false
stdout_logfile=/root/.joinmarket/logs/obwatch_stdout.log
stdout_logfile_maxbytes=5MB
Expand Down

0 comments on commit 0298b0f

Please sign in to comment.