Commit graph

3 commits

Author SHA1 Message Date
89374de57f feat: centralize configuration and improve Makefile
- Add config.sh with centralized container names and ports
- Update healthcheck.sh to use config variables (avoid hardcoding)
- Add health check targets to Makefile (health, health-*)
- Add backup utility targets to Makefile (backup, backup-*)
- Reorganize Makefile help output by service category
2025-12-14 10:00:00 +08:00
0fe7ed79ad refactor: 重构Minecraft服务器自动化管理方案
## 重构内容

### 新增自动化脚本系统 (scripts/)
- utils.sh: 通用工具库(日志、Docker操作、备份、网络检查)
- setup.sh: 环境初始化脚本(目录结构、权限、配置验证)
- mod-manager.sh: Mods管理(Modrinth下载、更新、清理)
- backup.sh: 备份管理(世界/配置/mods备份、恢复、清理)
- monitor.sh: 服务器监控(状态、资源、玩家、日志分析)

### 增强Makefile集成
新增命令:
- minecraft-status: 服务器状态检查
- minecraft-setup: 环境初始化
- minecraft-mods-*: Mods管理命令
- minecraft-backup-*: 备份管理命令

### 完善文档
- 重写README: 详细的使用指南、故障排查、迁移指南
- 新增CHANGELOG: 完整的重构说明和技术细节

## 架构改进

### 整合原有设计
- 继承src/automatic/的日志系统设计
- 改进Modrinth API集成逻辑
- 优化部署流程和备份机制

### 新增优势
- Docker优先的容器化方案
- 模块化脚本设计,职责单一
- Makefile统一管理入口
- 完整的生命周期自动化

## 技术特性

- 完善的错误处理和日志记录
- macOS/Linux跨平台兼容
- 敏感信息安全管理
- 持续监控模式

## 向后兼容

- 保留src/automatic/旧脚本(供参考)
- 配置文件格式完全兼容
- Docker Compose配置无变化
2025-12-09 10:00:00 +08:00
01054f7b22 feat: add unified Makefile for service management
Provide consistent interface for all operations
Simplify common tasks across services
Support both individual and batch operations

Unix philosophy: composable tools with standard interface
Make targets: help, status, up, down, logs, restart per service
2025-12-06 16:20:00 +08:00