## 重构内容 ### 新增自动化脚本系统 (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配置无变化 |
||
|---|---|---|
| bin | ||
| minecraft | ||
| nextcloud | ||
| teamspeak | ||
| .gitignore | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Automa
A collection of self-hosted service automation tools following the Unix philosophy: do one thing well, be composable, and stay simple.
Philosophy
This project embraces Unix principles:
- Modularity: Each service is self-contained
- Simplicity: Minimal dependencies, clear configuration
- Composability: Tools work together through standard interfaces
- Transparency: Plain text configuration, readable scripts
Services
Minecraft Server
Automated Minecraft Fabric server deployment with mod management.
Location: minecraft/
Quick Start:
cd minecraft
cp .env.example .env # Edit as needed
docker compose up -d
See minecraft/README.md for details.
TeamSpeak Server
Voice communication server with minimal configuration.
Location: teamspeak/
Quick Start:
cd teamspeak
cp .env.example .env # Edit as needed
docker compose up -d
See teamspeak/README.md for details.
Nextcloud
Self-hosted file sync and collaboration platform.
Location: nextcloud/
Quick Start:
cd nextcloud
cp .env.example .env # Edit as needed
docker compose up -d
See nextcloud/README.md for details.
Utilities
Organization Repository Cloner
Batch clone all repositories from a GitHub organization.
Location: bin/org-clone.sh
Usage:
./bin/org-clone.sh <org-name>
Prerequisites
- Docker & Docker Compose
- Bash 4.0+
- Git
Project Structure
automa/
├── bin/ # Utility scripts
│ └── org-clone.sh # GitHub org repo cloner
├── minecraft/ # Minecraft server setup
├── teamspeak/ # TeamSpeak server setup
├── nextcloud/ # Nextcloud setup
└── README.md # This file
Common Operations
All services follow consistent patterns:
Start a Service
cd <service-name>
docker compose up -d
View Logs
cd <service-name>
docker compose logs -f
Stop a Service
cd <service-name>
docker compose down
Update a Service
cd <service-name>
docker compose pull
docker compose up -d
Security Notes
- Always change default passwords in
.envfiles - Keep
.envfiles out of version control - Use strong passwords for production deployments
- Review exposed ports before deployment
Contributing
Contributions welcome. Keep changes:
- Simple and focused
- Well-documented
- Following existing patterns
- Unix philosophy aligned
License
MIT License - See LICENSE file for details.