- Add start.sh/start.bat for one-click startup (backend + frontend) - Add stop.sh/stop.bat for stopping all services - Add restart.sh for restarting services - Add status.sh for checking service status - Add Makefile with convenient management commands - Add comprehensive documentation (ONE_CLICK_START.md) - Update README with one-click startup instructions Features: - Automatic environment checking (venv, node_modules) - Process management with PID tracking - Unified log management (logs/*.log) - Health checking after startup - Support for Linux, macOS, and Windows - No more need for multiple terminal windows Usage: ./start.sh # Start all services ./stop.sh # Stop all services ./status.sh # Check service status ./restart.sh # Restart services make start # Alternative using Makefile Benefits: - One command instead of multiple terminals - Automatic environment validation - Centralized logging - Process lifecycle management - Developer-friendly output messages
25 lines
500 B
Bash
Executable File
25 lines
500 B
Bash
Executable File
#!/bin/bash
|
|
# ERP AI Assistant - 重启脚本
|
|
|
|
set -e
|
|
|
|
# 颜色定义
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# 项目根目录
|
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
echo -e "${BLUE}========================================${NC}"
|
|
echo -e "${BLUE} ERP AI Assistant - 重启中...${NC}"
|
|
echo -e "${BLUE}========================================${NC}"
|
|
echo ""
|
|
|
|
# 停止服务
|
|
"$PROJECT_ROOT/stop.sh"
|
|
|
|
# 等待进程完全停止
|
|
sleep 2
|
|
|
|
# 启动服务
|
|
"$PROJECT_ROOT/start.sh" |