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
|
sleep 3
|
||||||
|
|
||||||
# 检查服务状态
|
# 检查服务状态
|
||||||
if curl -s http://127.0.0.1:8016/health | grep -q "ok"; then
|
if curl -s http://127.0.0.1:8017/health | grep -q "ok"; then
|
||||||
echo "✓ 服务启动成功 (http://127.0.0.1:8016)"
|
echo "✓ 服务启动成功 (http://127.0.0.1:8017)"
|
||||||
else
|
else
|
||||||
echo "✗ 服务启动失败,请检查日志: $DC logs"
|
echo "✗ 服务启动失败,请检查日志: $DC logs"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
container_name: cc-ai-kefu
|
container_name: hs-ai-kefu
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- "8016:8000"
|
- "8017:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
+17
-17
@@ -1,5 +1,5 @@
|
|||||||
upstream cc_ai_kefu {
|
upstream hesupipe_ai_kefu {
|
||||||
server 127.0.0.1:8016;
|
server 127.0.0.1:8017;
|
||||||
keepalive 64;
|
keepalive 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ server {
|
|||||||
# return 301 https://$host$request_uri;
|
# return 301 https://$host$request_uri;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://cc_ai_kefu;
|
proxy_pass http://hesupipe_ai_kefu;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -20,7 +20,7 @@ server {
|
|||||||
|
|
||||||
# WebSocket 专用路由
|
# WebSocket 专用路由
|
||||||
location /ws/ {
|
location /ws/ {
|
||||||
proxy_pass http://cc_ai_kefu;
|
proxy_pass http://hesupipe_ai_kefu;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
@@ -34,7 +34,7 @@ server {
|
|||||||
|
|
||||||
# 静态文件直接由 OpenResty 处理,不走后端
|
# 静态文件直接由 OpenResty 处理,不走后端
|
||||||
location /static/ {
|
location /static/ {
|
||||||
alias /www/cc_ai_kefu/static/;
|
alias /www/hesupipe_ai_kefu/static/;
|
||||||
expires 7d;
|
expires 7d;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
@@ -43,7 +43,7 @@ server {
|
|||||||
|
|
||||||
# Widget.js 允许跨域(供其他网站嵌入)
|
# Widget.js 允许跨域(供其他网站嵌入)
|
||||||
location = /static/widget.js {
|
location = /static/widget.js {
|
||||||
alias /www/cc_ai_kefu/static/widget.js;
|
alias /www/hesupipe_ai_kefu/static/widget.js;
|
||||||
expires 1d;
|
expires 1d;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
@@ -53,7 +53,7 @@ server {
|
|||||||
|
|
||||||
# API 接口
|
# API 接口
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://cc_ai_kefu;
|
proxy_pass http://hesupipe_ai_kefu;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -62,11 +62,11 @@ server {
|
|||||||
|
|
||||||
# Health check
|
# Health check
|
||||||
location /health {
|
location /health {
|
||||||
proxy_pass http://cc_ai_kefu;
|
proxy_pass http://hesupipe_ai_kefu;
|
||||||
}
|
}
|
||||||
|
|
||||||
access_log /var/log/nginx/cc_ai_kefu_access.log;
|
access_log /var/log/nginx/hesupipe_ai_kefu_access.log;
|
||||||
error_log /var/log/nginx/cc_ai_kefu_error.log;
|
error_log /var/log/nginx/hesupipe_ai_kefu_error.log;
|
||||||
}
|
}
|
||||||
|
|
||||||
# HTTPS 配置(取消注释并填入证书路径启用)
|
# HTTPS 配置(取消注释并填入证书路径启用)
|
||||||
@@ -80,7 +80,7 @@ server {
|
|||||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
#
|
#
|
||||||
# location / {
|
# location / {
|
||||||
# proxy_pass http://cc_ai_kefu;
|
# proxy_pass http://hesupipe_ai_kefu;
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_set_header X-Real-IP $remote_addr;
|
# proxy_set_header X-Real-IP $remote_addr;
|
||||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -88,7 +88,7 @@ server {
|
|||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# location /ws/ {
|
# location /ws/ {
|
||||||
# proxy_pass http://cc_ai_kefu;
|
# proxy_pass http://hesupipe_ai_kefu;
|
||||||
# proxy_http_version 1.1;
|
# proxy_http_version 1.1;
|
||||||
# proxy_set_header Upgrade $http_upgrade;
|
# proxy_set_header Upgrade $http_upgrade;
|
||||||
# proxy_set_header Connection "upgrade";
|
# proxy_set_header Connection "upgrade";
|
||||||
@@ -101,27 +101,27 @@ server {
|
|||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# location /static/ {
|
# location /static/ {
|
||||||
# alias /www/cc_ai_kefu/static/;
|
# alias /www/hesupipe_ai_kefu/static/;
|
||||||
# expires 7d;
|
# expires 7d;
|
||||||
# add_header Cache-Control "public, immutable";
|
# add_header Cache-Control "public, immutable";
|
||||||
# add_header Access-Control-Allow-Origin *;
|
# add_header Access-Control-Allow-Origin *;
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# location = /static/widget.js {
|
# location = /static/widget.js {
|
||||||
# alias /www/cc_ai_kefu/static/widget.js;
|
# alias /www/hesupipe_ai_kefu/static/widget.js;
|
||||||
# expires 1d;
|
# expires 1d;
|
||||||
# add_header Cache-Control "public";
|
# add_header Cache-Control "public";
|
||||||
# add_header Access-Control-Allow-Origin *;
|
# add_header Access-Control-Allow-Origin *;
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# location /api/ {
|
# location /api/ {
|
||||||
# proxy_pass http://cc_ai_kefu;
|
# proxy_pass http://hesupipe_ai_kefu;
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_set_header X-Real-IP $remote_addr;
|
# proxy_set_header X-Real-IP $remote_addr;
|
||||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# access_log /var/log/nginx/cc_ai_kefu_access.log;
|
# access_log /var/log/nginx/hesupipe_ai_kefu_access.log;
|
||||||
# error_log /var/log/nginx/cc_ai_kefu_error.log;
|
# error_log /var/log/nginx/hesupipe_ai_kefu_error.log;
|
||||||
# }
|
# }
|
||||||
|
|||||||
Reference in New Issue
Block a user