feat: route bot service through nginx instead of direct port

This commit is contained in:
2026-04-03 19:21:58 -05:00
parent c7fd2b8210
commit 1980c81d1b
2 changed files with 15 additions and 6 deletions

View File

@@ -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

View File

@@ -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;