chore: 部署配置更名(hs-ai-kefu/8017/hesupipe_ai_kefu)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
+17
-17
@@ -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;
|
||||
# }
|
||||
|
||||
Reference in New Issue
Block a user