#!/bin/bash
#
# SmartClean 部署配置（无 Docker 版）
# 根据实际服务器环境修改以下配置

# ===== 服务器配置 =====
DEPLOY_HOST="192.168.1.182"
DEPLOY_USER="root"
DEPLOY_BASE="/opt/smartclean"

# ===== 服务器目录 =====
REMOTE_WEB_DIR="$DEPLOY_BASE/web"
REMOTE_TASK_DIR="$DEPLOY_BASE/task"
REMOTE_FRONT_DIR="$DEPLOY_BASE/front"
REMOTE_BACKUP_DIR="$DEPLOY_BASE/backups"
REMOTE_SCRIPTS_DIR="$DEPLOY_BASE/scripts"

# ===== Tomcat 配置 =====
TOMCAT_HOME="$REMOTE_WEB_DIR/tomcat"
TOMCAT_WEBAPPS="$TOMCAT_HOME/webapps"

# ===== Nginx 配置 =====
NGINX_HTML="$REMOTE_FRONT_DIR/dist"

# ===== Task 服务配置 =====
TASK_JAR_NAME="xiaoqu-intellectual-task-0.0.1-SNAPSHOT.jar"
TASK_PROFILE="prod"
TASK_JVM_OPTS="-Xms256m -Xmx512m"

# ===== 本地构建产物路径 =====
LOCAL_WAR="backend/xiaoqu-intellectual-web/target/ROOT.war"
LOCAL_TASK_JAR="backend/xiaoqu-intellectual-task/target/$TASK_JAR_NAME"
LOCAL_FRONT_DIST="frontend/witcleansystem/dist"

# ===== 备份保留数量 =====
MAX_BACKUPS=5

# ===== 健康检查 =====
HEALTHCHECK_URL="http://$DEPLOY_HOST:8095/dropDown/districtTree"
HEALTHCHECK_RETRIES=20
HEALTHCHECK_INTERVAL=5

# ===== 飞书通知 =====
FEISHU_WEBHOOK="https://open.feishu.cn/open-apis/bot/v2/hook/5703e8cc-6998-46a6-af9d-8c5102cc8c1e"
