feat: route bot service through nginx instead of direct port
This commit is contained in:
@@ -104,8 +104,6 @@ services:
|
||||
|
||||
bot:
|
||||
image: ${NALIIA_BOT:-gitea.onecluster.org/oneteam/naliia_bot:v1.0.0_pro}
|
||||
ports:
|
||||
- "8010:8010"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
19
nginx.conf
19
nginx.conf
@@ -8,10 +8,21 @@ server {
|
||||
|
||||
location / {
|
||||
proxy_pass http://tryton:8000/; # "trytond" is the service name of another Docker container on port 8000
|
||||
proxy_read_timeout 500;
|
||||
proxy_connect_timeout 500;
|
||||
proxy_send_timeout 500;
|
||||
proxy_set_header Host ${VARIABLE}host;
|
||||
proxy_read_timeout 500;
|
||||
proxy_connect_timeout 500;
|
||||
proxy_send_timeout 500;
|
||||
proxy_set_header Host ${VARIABLE}host;
|
||||
proxy_set_header X-Real-IP ${VARIABLE}remote_addr;
|
||||
proxy_set_header X-Forwarded-For ${VARIABLE}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${VARIABLE}server_name;
|
||||
}
|
||||
|
||||
location /naliia_agent/api {
|
||||
proxy_pass http://bot:8010/; # "bot" is the service name of another Docker container on port 8010
|
||||
proxy_read_timeout 500;
|
||||
proxy_connect_timeout 500;
|
||||
proxy_send_timeout 500;
|
||||
proxy_set_header Host ${VARIABLE}host;
|
||||
proxy_set_header X-Real-IP ${VARIABLE}remote_addr;
|
||||
proxy_set_header X-Forwarded-For ${VARIABLE}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${VARIABLE}server_name;
|
||||
|
||||
Reference in New Issue
Block a user