Commit graph

10 commits

Author SHA1 Message Date
e5542de818 polish: CLI UX overhaul and rich .env.example metadata
CLI improvements:
- Unicode status indicators (✔ ✘ ▶ ● ○ ⚠) and braille spinners
- Animated spinner for docker pull/up operations
- Project metadata parsed from .env.example (@name, @desc, @url, @port, @note)
- Descriptions shown in list, deploy selection, and status views
- Auto-generate passwords for secret fields (PASSWORD/TOKEN/AUTHKEY)
- Confirmation prompt before deploy with project summary
- Post-deploy access URL hint based on @port metadata
- Divider lines for visual section separation
- Helpful error messages with suggested commands
- Command aliases: ls, st, ps, down, log, configure
- Bash 3.2 compatible (no associative arrays)

.env.example enrichment:
- All projects now have @name, @desc, @url, @port metadata headers
- Inline field descriptions shown as context during interactive config
- Tailscale: @note hints for profile-based DERP deployment
- Structured comments group related settings visually

Installer:
- Prerequisite check with per-tool status (✔/✘)
- Quieter git operations
- Cleaner post-install instructions
2026-04-15 10:15:43 +08:00
1ef24b3be8 improve: best-practice configs for all projects, CLI UX overhaul
Compose improvements:
- forgejo: add healthcheck (/api/healthz), ROOT_URL + SSH_PORT env, LFS
- tailscale: drop redundant privileged (use cap_add only), use devices
  for /dev/net/tun, mount /lib/modules, reliable healthcheck (tailscale
  status), profiles for opt-in DERP, headscale comment in .env.example
- uptime-kuma: add built-in healthcheck (extra/healthcheck)
- filesuite: add healthchecks for both cloudreve and qbittorrent
- minecraft: add mc-health check (built into itzg image), simplify volumes
- teamspeak: add healthcheck via ServerQuery (nc localhost 10011)
- nextcloud: add healthchecks for all 3 services, depends_on with
  service_healthy conditions so startup order is correct

CLI improvements:
- Fix docker compose detection (was broken with space in arg)
- Use global array for project discovery (no word-splitting bugs)
- Empty selection no longer defaults to "all" (safety)
- Show .env.example comments as hints during interactive configure
- Required fields (empty default) loop until user provides a value
- Disable colors when stdout is not a terminal
- compose() wrapper auto-adds --env-file
- Deduplicate project_exists / project_dir helpers
2026-04-15 10:02:41 +08:00
3433516287 refactor: restructure as self-contained project dirs with interactive CLI
- Remove old services/, bin/, config.sh, Makefile, setup.sh
- Each Docker Compose project is now a top-level self-contained directory
  with compose.yaml + .env.example (project self-governance)
- Add automa CLI: interactive deploy, status, logs, stop, update, config
- Add install.sh for curl-pipe-bash quick start
- New projects from production: uptime-kuma, tailscale+derp, monitoring
  (prometheus+grafana+blackbox+node-exporter), filesuite (cloudreve+qbt),
  huajibot, dockge, notification-center
- Clean up existing projects: forgejo, minecraft, teamspeak, nextcloud
- Sanitize all .env.example files (no real secrets)
2026-04-15 09:54:23 +08:00
3e1d752bfd refactor: extract shared utilities into common library
- Create bin/lib/common.sh with shared logging and utility functions
- Add minecraft/.env.example for environment configuration template
- Update bin scripts to source shared library (DRY principle)
- Consolidate duplicated logging functions across scripts
2025-12-13 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
4ff60014df refactor: improve Minecraft automation scripts
Standardize shebang to #!/usr/bin/env bash
Add descriptive headers to all scripts
Make all scripts executable

Consistent with Unix best practices:
- Portable shebang usage
- Self-documenting code
- Proper file permissions
2025-12-08 10:30:00 +08:00
33ade46a99 upload org multi repository clone scripts 2025-11-14 11:08:39 +08:00
2207914289 update minecraft compose file and some specific config 2025-11-12 15:33:22 +08:00
a177ec70d7 add compose.yaml 2025-11-02 18:13:50 +08:00
3bafd84230 init index and upload the scripts of minecraft 2025-10-28 11:13:41 +08:00