Commit Graph

12 Commits

Author SHA1 Message Date
ZhouYongyou
a59f4951e8 fix: 修復首次運行時數據庫初始化失敗問題
問題:
- 用戶首次運行報錯:unable to open database file: is a directory
- 原因:Docker volume 掛載時,如果 config.db 不存在,會創建目錄而非文件
- 影響:新用戶無法正常啟動系統

修復:
- 在 start.sh 啟動前檢查 config.db 是否存在
- 如不存在則創建空文件(touch config.db)
- 確保 Docker 掛載為文件而非目錄

測試:
- 首次運行:./start.sh start → 正常初始化 ✓
- 現有用戶:無影響,向後兼容 ✓
2025-11-04 17:35:26 +08:00
icy
f413f87f39 Fixed health check; Fixed dex config; Add rank trader info view; 2025-11-01 18:58:32 +08:00
icy
67f8e0f924 Fix docker compose bug for config.db 2025-10-31 15:53:48 +08:00
icy
8296d9843a Sync config.json to config.db for manual modify admin_mode and other configs 2025-10-31 15:24:18 +08:00
icy
3405f0dd3b start scrip fix 2025-10-31 14:41:45 +08:00
icy
9675735073 start scrpit fix 2025-10-31 14:39:04 +08:00
icy
458f5c20cc start script fix about config.json 2025-10-31 14:16:47 +08:00
icy
dd88997d8e Restore config.json.example 2025-10-31 14:09:28 +08:00
icy
24a2a83975 Fix start script 2025-10-31 12:46:16 +08:00
d0lwl0b
2a831073c5 chore: update .dockerignore to exclude lock files 2025-10-30 00:28:39 +08:00
d0lwl0b
b2c09ca15b chore: add environment variable support and enhance startup script
- Add .env.example template for configurable Docker deployment settings
- Update docker-compose.yml to support environment-driven port/timezone configuration
- Refactor start.sh with improved Docker Compose detection, environment validation, and automated frontend building
- Enhance script documentation and error handling for better maintainability
2025-10-29 22:35:01 +08:00
tinkle
20ad60c12c Docs: Add Docker one-click deployment support for all languages
Complete Docker deployment solution with beginner-friendly documentation:

**New Docker Files:**
- `Dockerfile` - Multi-stage Go backend build with health checks
- `web/Dockerfile` - Frontend build with Nginx and API proxy
- `docker-compose.yml` - Full orchestration with service dependencies
- `.dockerignore` & `web/.dockerignore` - Build optimization
- `start.sh` - Convenient management script (start/stop/logs/status)

**Comprehensive Documentation:**
- `DOCKER_DEPLOY.md` (中文) - Complete Chinese deployment guide
- `DOCKER_DEPLOY.en.md` (English) - Complete English deployment guide
  - Prerequisites & Docker installation (macOS/Windows/Linux)
  - 3-step quick start (config → start → access)
  - Service management commands
  - Advanced configuration (ports, resources, env vars)
  - Data persistence & backups
  - Comprehensive troubleshooting
  - Security recommendations
  - Production deployment (Nginx, HTTPS, Docker Swarm)
  - Monitoring & logging setup

**README Updates (All 4 Languages):**
- README.md (English)
- README.zh-CN.md (中文)
- README.uk.md (Українська)
- README.ru.md (Русский)

Added prominent "Option A: Docker One-Click Deployment" section at the
beginning of Quick Start in all languages. Clearly marked as EASIEST
method for beginners. Shows 3 simple steps with command examples and
links to detailed DOCKER_DEPLOY docs.

**Key Features:**
- One-command deployment: `./start.sh start --build`
- Auto-handles all dependencies (Go, Node.js, TA-Lib)
- Health checks for both services
- Data persistence (logs, cache, config)
- Log rotation (10MB × 3 files)
- Easy service management
- Beginner-friendly for complete newcomers

**User Benefits:**
- No need to install Go, Node.js, or TA-Lib manually
- Works on macOS, Windows, Linux
- Perfect for non-developers
- Production-ready with best practices

This makes NOFX truly accessible to beginners as requested: "真就让小白都能一键开始"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 18:29:49 +08:00