Commit Graph

19 Commits

Author SHA1 Message Date
Icyoung 062184054d Dev remove admin mode (#723)
* feat: remove admin mode
* feat: bugfix
---------
Co-authored-by: icy <icyoung520@gmail.com>
2025-11-07 23:37:23 +08:00
Burt 8b853a963d Feat: Enable admin password in admin mode (#540)
* WIP: save local changes before merging
* Enable admin password in admin mode #374
2025-11-05 21:48:28 +08:00
Liu Xiang Qian f8edc0ec11 fix: add AI_MAX_TOKENS environment variable to prevent response truncation
## Problem
AI responses were being truncated due to a hardcoded max_tokens limit of 2000,
causing JSON parsing failures. The error occurred when:
1. AI's thought process analysis was cut off mid-response
2. extractDecisions() incorrectly extracted MACD data arrays from the input prompt
3. Go failed to unmarshal numbers into Decision struct
Error message:
```
json: cannot unmarshal number into Go value of type decision.Decision
JSON内容: [-867.759, -937.406, -1020.435, ...]
```
## Solution
- Add MaxTokens field to mcp.Client struct
- Read AI_MAX_TOKENS from environment variable (default: 2000)
- Set AI_MAX_TOKENS=4000 in docker-compose.yml for production use
- This provides enough tokens for complete analysis with the 800-line trading strategy prompt
## Testing
- Verify environment variable is read correctly
- Confirm AI responses are no longer truncated
- Check decision logs for complete JSON output
2025-11-05 09:31:58 +08:00
icy 0a2476960e Fixed beta codes file mapping 2025-11-02 17:19:58 +08:00
SkywalkerJi f6ff790b42 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2025-11-01 22:31:09 +08:00
SkywalkerJi f4ab9baba6 Docker port mapping prompts. 2025-11-01 22:28:49 +08:00
icy 8d93a8a095 Fixed health check; Fixed dex config; Add rank trader info view; 2025-11-01 18:58:32 +08:00
icy f35dcf857f Add config.db volume mapping to docker-compose
- Map config.db to host for database persistence
- Ensures user configurations, traders, and AI models persist across container restarts
- Enables easy backup of configuration database
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-31 15:31:47 +08:00
icy bbe1e1f929 Merge remote tracking branch into local development
- Resolved conflicts in README.md: Combined web-based config updates with multi-exchange support
- Resolved conflicts in main.go: Fixed database initialization and default coin settings
- Resolved conflicts in manager/trader_manager.go: Updated trader management for new database structure
- Resolved conflicts in web/src/App.tsx: Combined UI improvements with responsive design
- Resolved conflicts in web/.dockerignore: Merged dependency exclusions
- Removed deprecated files: Dockerfile, config/config.go, web/Dockerfile, ComparisonChart.tsx, CompetitionPage.tsx
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-30 20:57:57 +08:00
icy 82beac0920 sync fork 2025-10-30 20:51:22 +08:00
d0lwl0b 0d52bc8ad9 refactor(docker): restructure Docker setup with dedicated backend/frontend services 2025-10-30 13:11:29 +08:00
d0lwl0b 236d97c127 Merge branch 'tinkle-community:main' into main 2025-10-30 12:13:00 +08:00
itfisher 027c0a31e4 fix conflict 2025-10-30 10:33:41 +08:00
d0lwl0b 55df1241ed Merge branch 'tinkle-community:main' into main 2025-10-30 00:19:12 +08:00
Yinghao Fan 2f577d9f01 Enhance Docker setup: Add shared volume for frontend files and update Dockerfile for dependencies
Changes:
- Updated `docker-compose.yml` to include a new shared volume `frontend-dist` for frontend files.
- Modified the `nofx` service command to copy frontend files to the shared volume.
- Updated `Dockerfile` to use Go 1.25 and added necessary build dependencies for TA-Lib installation.
These changes improve the Docker environment by facilitating shared access to frontend assets and ensuring the build process is up-to-date with the latest Go version.
2025-10-29 23:34:21 +08:00
itfisher 7d2de92720 fix health check 2025-10-29 23:10:47 +08:00
d0lwl0b 0c599ba70b 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
PorunC 92b0dd5f16 Feat: Upgrade Docker deployment with multi-stage build and Nginx integration
- Upgrade Dockerfile to Go 1.24 with multi-stage build (backend + frontend)
- Add TA-Lib installation for technical analysis support
- Integrate frontend build into main container image
- Add Nginx reverse proxy configuration for API routing
- Update docker-compose.yml to simplified single-container architecture
- Update .dockerignore to include web source for build
- Improve health checks and startup time handling
Benefits:
- One-click deployment with single Docker image
- Better resource utilization with multi-stage build
- Production-ready Nginx frontend serving
- Easier maintenance and deployment
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-29 20:29:34 +08:00
tinkle-community a7d0ca8835 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: "真就让小白都能一键开始"
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-29 18:29:49 +08:00