修改docker-compose

This commit is contained in:
XIE7654
2025-07-18 22:14:37 +08:00
parent 5aaf78ae6c
commit b8bdb5d206
36 changed files with 739 additions and 59 deletions

View File

@@ -37,7 +37,7 @@ http {
}
# 代理后端 API
location /api/ {
location /api/admin/ {
proxy_pass http://backend:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -57,7 +57,26 @@ http {
access_log /var/log/nginx/assets_access.log;
error_log /var/log/nginx/assets_error.log;
}
location /api/ai/ {
proxy_pass http://ai_service:8010;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 180;
proxy_send_timeout 180;
proxy_read_timeout 180;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
#proxy_cache_bypass $http_upgrade;
#proxy_cache_key $uri$request_body; #增加此行
#proxy_cache_methods GET POST; #增加此行
#add_header Access-Control-Allow-Headers X-API-Token;
access_log /var/log/nginx/assets_access.log;
error_log /var/log/nginx/assets_error.log;
}
# 前端 history 路由
location / {
try_files $uri $uri/ /index.html;