From cb8c65fc5ab3f2143e5f8d210e2dbde294347883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 29 Sep 2026 18:30:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=83=A8=E7=BD=B2=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=9B=B4=E5=90=8D(hs-ai-kefu/8017/hesupipe=5Fai=5Fkefu)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- deploy.sh | 4 ++-- docker-compose.yml | 4 ++-- openresty.conf | 34 +++++++++++++++++----------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/deploy.sh b/deploy.sh index b277e5d..e25782c 100644 --- a/deploy.sh +++ b/deploy.sh @@ -26,8 +26,8 @@ echo ">>> 等待服务就绪..." sleep 3 # 检查服务状态 -if curl -s http://127.0.0.1:8016/health | grep -q "ok"; then - echo "✓ 服务启动成功 (http://127.0.0.1:8016)" +if curl -s http://127.0.0.1:8017/health | grep -q "ok"; then + echo "✓ 服务启动成功 (http://127.0.0.1:8017)" else echo "✗ 服务启动失败,请检查日志: $DC logs" exit 1 diff --git a/docker-compose.yml b/docker-compose.yml index 7ebb74b..9a20fbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,12 @@ services: app: build: . - container_name: cc-ai-kefu + container_name: hs-ai-kefu restart: always env_file: - .env ports: - - "8016:8000" + - "8017:8000" volumes: - ./data:/app/data environment: diff --git a/openresty.conf b/openresty.conf index 488586a..fb0fa52 100644 --- a/openresty.conf +++ b/openresty.conf @@ -1,5 +1,5 @@ -upstream cc_ai_kefu { - server 127.0.0.1:8016; +upstream hesupipe_ai_kefu { + server 127.0.0.1:8017; keepalive 64; } @@ -11,7 +11,7 @@ server { # return 301 https://$host$request_uri; location / { - proxy_pass http://cc_ai_kefu; + proxy_pass http://hesupipe_ai_kefu; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -20,7 +20,7 @@ server { # WebSocket 专用路由 location /ws/ { - proxy_pass http://cc_ai_kefu; + proxy_pass http://hesupipe_ai_kefu; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -34,7 +34,7 @@ server { # 静态文件直接由 OpenResty 处理,不走后端 location /static/ { - alias /www/cc_ai_kefu/static/; + alias /www/hesupipe_ai_kefu/static/; expires 7d; add_header Cache-Control "public, immutable"; add_header Access-Control-Allow-Origin *; @@ -43,7 +43,7 @@ server { # Widget.js 允许跨域(供其他网站嵌入) location = /static/widget.js { - alias /www/cc_ai_kefu/static/widget.js; + alias /www/hesupipe_ai_kefu/static/widget.js; expires 1d; add_header Cache-Control "public"; add_header Access-Control-Allow-Origin *; @@ -53,7 +53,7 @@ server { # API 接口 location /api/ { - proxy_pass http://cc_ai_kefu; + proxy_pass http://hesupipe_ai_kefu; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -62,11 +62,11 @@ server { # Health check location /health { - proxy_pass http://cc_ai_kefu; + proxy_pass http://hesupipe_ai_kefu; } - access_log /var/log/nginx/cc_ai_kefu_access.log; - error_log /var/log/nginx/cc_ai_kefu_error.log; + access_log /var/log/nginx/hesupipe_ai_kefu_access.log; + error_log /var/log/nginx/hesupipe_ai_kefu_error.log; } # HTTPS 配置(取消注释并填入证书路径启用) @@ -80,7 +80,7 @@ server { # ssl_ciphers HIGH:!aNULL:!MD5; # # location / { -# proxy_pass http://cc_ai_kefu; +# proxy_pass http://hesupipe_ai_kefu; # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -88,7 +88,7 @@ server { # } # # location /ws/ { -# proxy_pass http://cc_ai_kefu; +# proxy_pass http://hesupipe_ai_kefu; # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection "upgrade"; @@ -101,27 +101,27 @@ server { # } # # location /static/ { -# alias /www/cc_ai_kefu/static/; +# alias /www/hesupipe_ai_kefu/static/; # expires 7d; # add_header Cache-Control "public, immutable"; # add_header Access-Control-Allow-Origin *; # } # # location = /static/widget.js { -# alias /www/cc_ai_kefu/static/widget.js; +# alias /www/hesupipe_ai_kefu/static/widget.js; # expires 1d; # add_header Cache-Control "public"; # add_header Access-Control-Allow-Origin *; # } # # location /api/ { -# proxy_pass http://cc_ai_kefu; +# proxy_pass http://hesupipe_ai_kefu; # 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; # } # -# access_log /var/log/nginx/cc_ai_kefu_access.log; -# error_log /var/log/nginx/cc_ai_kefu_error.log; +# access_log /var/log/nginx/hesupipe_ai_kefu_access.log; +# error_log /var/log/nginx/hesupipe_ai_kefu_error.log; # }