feat: add interactive deployment script with one-liner installation

- Add deploy-interactive.sh: Interactive deployment script with automatic configuration
  - Auto-generate secure random keys (JWT, admin reset key, crypto key, DB password)
  - Smart .env detection for quick updates without reconfiguration
  - Random port generation (10000-60000) for SERVER_PORT default
  - Interactive prompts with clear defaults and auto-generation hints
  - Automatic docker-compose.prod.yml download from GitHub
  - Health check and deployment verification

- Add deploy-interactive-README.md: Comprehensive deployment guide
  - One-liner installation commands (curl/wget)
  - Quick update workflow for existing deployments
  - Detailed feature explanations and usage examples

- Update README.md & README_EN.md: Add one-liner installation section
  - Automatic working directory creation (~polyhermes)
  - Simplified deployment process for new users
  - Clear benefits and features list

Features:
- 📁 Auto-creates ~/polyhermes working directory
- 🔐 Generates secure random secrets automatically
-  Quick update mode: skip config if .env exists
- 🚀 One command from zero to running
- 🌐 Downloads latest docker-compose config from GitHub
-  Full health check and verification
This commit is contained in:
WrBug
2026-02-01 03:12:27 +08:00
parent 8f52b5016a
commit 7485e2ce24
4 changed files with 745 additions and 0 deletions
+23
View File
@@ -165,6 +165,29 @@
**部署步骤**
#### ⚡ 一键安装(最快,推荐新用户)
**使用 curl(推荐):**
```bash
mkdir -p ~/polyhermes && cd ~/polyhermes && curl -fsSL https://raw.githubusercontent.com/WrBug/PolyHermes/main/deploy-interactive.sh -o deploy.sh && chmod +x deploy.sh && ./deploy.sh
```
**使用 wget**
```bash
mkdir -p ~/polyhermes && cd ~/polyhermes && wget -O deploy.sh https://raw.githubusercontent.com/WrBug/PolyHermes/main/deploy-interactive.sh && chmod +x deploy.sh && ./deploy.sh
```
这个命令会自动:
- 📁 创建专用工作目录 `~/polyhermes`
- ✅ 自动检查 Docker 环境
- ⚙️ 交互式配置所有参数(支持回车使用默认值)
- 🔐 自动生成安全的随机密钥
- 🚀 自动下载最新镜像并部署
---
#### 📋 其他部署方式
1. **使用 Docker Hub 镜像(推荐,生产环境首选)**
**方式 1:独立部署(无需 clone 代码,推荐)**