Files
ars-backend/script/restart-docker-compose.sh
ROOG e956df9daa main: 增强工具功能与消息处理
- 添加 `FileReadTool`,支持文件内容读取与安全验证
- 引入 `hasToolMessages` 逻辑,优化工具历史上下文处理
- 修改工具选项逻辑,支持禁用工具时的动态调整
- 增加消息序列化逻辑,优化 Redis 序列管理与数据同步
- 扩展测试覆盖,验证序列化与工具调用场景
- 增强 Docker Compose 脚本,支持应用重置与日志清理
- 调整工具调用超时设置,提升运行时用户体验
2025-12-24 00:55:54 +08:00

68 lines
1.3 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 定义颜色
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# 打印带颜色的信息
print_info() {
echo -e "${BLUE} $1${NC}"
}
print_success() {
echo -e "${GREEN}$1${NC}"
}
print_warning() {
echo -e "${YELLOW}⚠️ $1${NC}"
}
print_error() {
echo -e "${RED}$1${NC}"
}
# 打印分割线
print_separator() {
echo -e "${BLUE}────────────────────────────────────${NC}"
}
# 主流程
print_separator
print_info "Docker Compose 重启脚本"
print_separator
echo ""
# Step 1: 停止服务
print_info "Step 1/3: 停止 Docker Compose 服务..."
if docker compose down 2>&1; then
print_success "服务已成功停止"
else
print_error "停止服务失败"
exit 1
fi
echo ""
# Step 2: 启动服务
print_info "Step 2/3: 启动 Docker Compose 服务(后台模式)..."
if docker compose up -d 2>&1; then
print_success "服务已成功启动"
else
print_error "启动服务失败"
exit 1
fi
echo ""
# Step 3: 显示状态
print_info "Step 3/3: 检查服务状态..."
echo ""
docker compose ps
echo ""
# 完成
print_separator
print_success "🎉 Docker Compose 服务重启完成!"
print_separator