diff --git a/docker-compose.yml b/docker-compose.yml index 3db5228..fa8e35e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: image: ${REGISTRY}/tenant-service:${IMAGE_TAG} profiles: ["base"] ports: - - "9001:9001" + - "127.0.0.1:10223:9001" env_file: - ./config/xuqm.env # 业务配置:运行模式、域名、功能开关 - ./config/secrets.env # 敏感配置:密码、Token @@ -43,7 +43,7 @@ services: image: ${REGISTRY}/file-service:${IMAGE_TAG} profiles: ["base"] ports: - - "8086:8086" + - "127.0.0.1:10224:8086" env_file: - ./config/xuqm.env - ./config/secrets.env @@ -68,7 +68,7 @@ services: image: ${REGISTRY}/tenant-web:${IMAGE_TAG} profiles: ["base"] ports: - - "8080:80" + - "127.0.0.1:10225:80" restart: unless-stopped # --------------------------------------------------------------------------- @@ -79,7 +79,7 @@ services: image: ${REGISTRY}/ops-web:${IMAGE_TAG} profiles: ["base"] ports: - - "8081:80" + - "127.0.0.1:10226:80" restart: unless-stopped # --------------------------------------------------------------------------- @@ -114,7 +114,7 @@ services: image: ${REGISTRY}/im-service:${IMAGE_TAG} profiles: ["im"] ports: - - "8082:8082" + - "127.0.0.1:10227:8082" env_file: - ./config/xuqm.env - ./config/secrets.env @@ -139,7 +139,7 @@ services: image: ${REGISTRY}/push-service:${IMAGE_TAG} profiles: ["push"] ports: - - "8083:8083" + - "127.0.0.1:10228:8083" env_file: - ./config/xuqm.env - ./config/secrets.env @@ -159,7 +159,7 @@ services: image: ${REGISTRY}/update-service:${IMAGE_TAG} profiles: ["update"] ports: - - "8084:8084" + - "127.0.0.1:10229:8084" env_file: - ./config/xuqm.env - ./config/secrets.env @@ -182,7 +182,7 @@ services: image: ${REGISTRY}/license-service:${IMAGE_TAG} profiles: ["license"] ports: - - "8085:8085" + - "127.0.0.1:10230:8085" env_file: - ./config/xuqm.env - ./config/secrets.env diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 41f26bb..8756143 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -658,7 +658,7 @@ docker compose \ printf ' 等待 tenant-service 启动' for i in $(seq 1 40); do code="$(curl -skL --noproxy '*' -o /dev/null -w '%{http_code}' --max-time 4 \ - "http://127.0.0.1:9001/actuator/health" 2>/dev/null || echo 000)" + "http://127.0.0.1:10223/actuator/health" 2>/dev/null || echo 000)" if [ "$code" = "200" ]; then printf '\n' ok "tenant-service 健康 (HTTP 200)" @@ -841,7 +841,7 @@ print(json.dumps(resp['data'])) -H "Content-Type: application/json" \ --data-binary @- \ -w "\n__HTTP_STATUS__:%{http_code}" \ - "http://127.0.0.1:9001/api/private/deployment/migrate/import") + "http://127.0.0.1:10223/api/private/deployment/migrate/import") _IMPORT_STATUS=$(printf '%s' "$_IMPORT_RESP" | grep -o '__HTTP_STATUS__:[0-9]*' | cut -d: -f2) _IMPORT_BODY=$(printf '%s' "$_IMPORT_RESP" | sed 's/__HTTP_STATUS__:[0-9]*//') if [ "${_IMPORT_STATUS}" != "200" ]; then @@ -919,40 +919,40 @@ else printf ' 密码: 同生产平台密码(原样迁移,未重置)\n' fi printf '\n \033[1m容器端口(请在您的 nginx 中配置代理):\033[0m\n' -printf ' 控制台前端 127.0.0.1:8080 → 代理 /\n' -printf ' 运营后台 127.0.0.1:8081 → 代理 /ops\n' -printf ' 核心 API 127.0.0.1:9001 → 代理 /api/ /actuator/\n' -printf ' 文件服务 127.0.0.1:8086 → 代理 /file/ /api/file/\n' -printf ' IM 服务 127.0.0.1:8082 → 代理 /api/im/ /ws/im\n' -printf ' 版本管理 127.0.0.1:8084 → 代理 /api/v1/updates/ /api/v1/rn/\n' -printf ' License 服务 127.0.0.1:8085 → 代理 /api/license/\n' -printf ' 推送服务 127.0.0.1:8083 (厂商回调,按需代理)\n' +printf ' 控制台前端 127.0.0.1:10225 → 代理 /\n' +printf ' 运营后台 127.0.0.1:10226 → 代理 /ops\n' +printf ' 核心 API 127.0.0.1:10223 → 代理 /api/ /actuator/\n' +printf ' 文件服务 127.0.0.1:10224 → 代理 /file/ /api/file/\n' +printf ' IM 服务 127.0.0.1:10227 → 代理 /api/im/ /ws/im\n' +printf ' 版本管理 127.0.0.1:10229 → 代理 /api/v1/updates/ /api/v1/rn/\n' +printf ' License 服务 127.0.0.1:10230 → 代理 /api/license/\n' +printf ' 推送服务 127.0.0.1:10228 (厂商回调,按需代理)\n' printf '\n \033[1mNginx 配置参考(复制到您的 nginx server 块):\033[0m\n' printf '\033[0;37m' cat <<'NGINX_REF' charset utf-8; client_max_body_size 100m; - location /api/v1/updates/ { proxy_pass http://127.0.0.1:8084/api/v1/updates/; } - location /api/v1/rn/ { proxy_pass http://127.0.0.1:8084/api/v1/rn/; } - location /api/im/ { proxy_pass http://127.0.0.1:8082/api/im/; } + location /api/v1/updates/ { proxy_pass http://127.0.0.1:10229/api/v1/updates/; } + location /api/v1/rn/ { proxy_pass http://127.0.0.1:10229/api/v1/rn/; } + location /api/im/ { proxy_pass http://127.0.0.1:10227/api/im/; } location /ws/im { - proxy_pass http://127.0.0.1:8082/ws/im; + proxy_pass http://127.0.0.1:10227/ws/im; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 3600s; } - location /api/license/ { proxy_pass http://127.0.0.1:8085/api/license/; } + location /api/license/ { proxy_pass http://127.0.0.1:10230/api/license/; } location /file/ { - proxy_pass http://127.0.0.1:8086/file/; + proxy_pass http://127.0.0.1:10224/file/; client_max_body_size 500m; proxy_read_timeout 300s; } - location /api/ { proxy_pass http://127.0.0.1:9001/api/; } - location /actuator/ { proxy_pass http://127.0.0.1:9001/actuator/; } - location /ops { proxy_pass http://127.0.0.1:8081; } - location / { proxy_pass http://127.0.0.1:8080; } + location /api/ { proxy_pass http://127.0.0.1:10223/api/; } + location /actuator/ { proxy_pass http://127.0.0.1:10223/actuator/; } + location /ops { proxy_pass http://127.0.0.1:10226; } + location / { proxy_pass http://127.0.0.1:10225; } NGINX_REF printf '\033[0m' printf '\n \033[1m部署目录:\033[0m %s\n' "$ROOT_DIR"