mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 01:48:22 +08:00
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>
This commit is contained in:
+17
-37
@@ -1,68 +1,48 @@
|
||||
services:
|
||||
# 后端服务
|
||||
backend:
|
||||
# Backend service (API and core logic)
|
||||
nofx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: nofx-backend
|
||||
dockerfile: ./docker/Dockerfile.backend
|
||||
container_name: nofx-trading
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "${NOFX_BACKEND_PORT:-8080}:8080"
|
||||
volumes:
|
||||
# 挂载配置文件(必须)
|
||||
- ./config.json:/app/config.json:ro
|
||||
# 持久化决策日志
|
||||
- ./decision_logs:/app/decision_logs
|
||||
# 持久化币种池缓存
|
||||
- ./coin_pool_cache:/app/coin_pool_cache
|
||||
- /etc/localtime:/etc/localtime:ro # Sync host time
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- TZ=${NOFX_TIMEZONE:-Asia/Shanghai} # Set timezone
|
||||
networks:
|
||||
- nofx-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
start_period: 60s
|
||||
|
||||
# 前端服务
|
||||
frontend:
|
||||
# Frontend service (static serving and proxy)
|
||||
nofx-frontend:
|
||||
build:
|
||||
context: ./web
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile.frontend
|
||||
container_name: nofx-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
- "${NOFX_FRONTEND_PORT:-3000}:80"
|
||||
networks:
|
||||
- nofx-network
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
depends_on:
|
||||
- nofx
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
networks:
|
||||
nofx-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
decision_logs:
|
||||
coin_pool_cache:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user