Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM nginx:1.20.2
COPY nginx.conf /etc/nginx/nginx.conf.org
COPY health-check.conf /etc/nginx/
ENV EXPOSED_PORT 443
ENTRYPOINT sh -c 'envsubst \$EXPOSED_PORT < /etc/nginx/nginx.conf.org | tee /etc/nginx/nginx.conf && nginx -g "daemon off;"'
EXPOSE 443
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ services:
nginx:
image: ghcr.io/opexdev/nginx:$TAG
build: .
ports:
- "$EXPOSED_PORT:443"
environment:
- EXPOSED_PORT=$EXPOSED_PORT
6 changes: 6 additions & 0 deletions health-check.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
location ~ ^\/(auth|wallet|gateway|matching-engine|storage|referral|stream|ipg|admin|api|captcha|bitcoin-scanner|ethereum-scanner|bsc-scanner|tron-scanner|scanner-scheduler|binance):8080\/actuator\/health$ {
rewrite ^\/(.*)\/actuator\/health$ $1;
set $backend http://$uri;
proxy_pass $backend;
rewrite .* /actuator/health break;
}
2 changes: 2 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ http {
return 204;
}

include /etc/nginx/health-check.conf;

location /wallet/transfer {
return 403;
}
Expand Down