Files
nofx/docker-compose.yml
T
tinkle-community 319ccb8ca3 fix: initial balance calculation and UI improvements
- Fix initial balance using available_balance instead of total_equity
- Fix WSMonitor nil pointer by starting market monitor before loading traders
- Add strategy name display on traders list and dashboard pages
- Various position sync and trading improvements
2025-12-10 14:40:08 +08:00

51 lines
1.3 KiB
YAML

services:
# Backend service (API and core logic)
nofx:
build:
context: .
dockerfile: ./docker/Dockerfile.backend
container_name: nofx-trading
restart: unless-stopped
stop_grace_period: 30s # 允许应用有 30 秒时间优雅关闭
ports:
- "${NOFX_BACKEND_PORT:-8080}:8080"
volumes:
- ./data:/app/data
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
environment:
- TZ=${TZ:-Asia/Shanghai}
- AI_MAX_TOKENS=8000
networks:
- nofx-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Frontend service (static serving and proxy)
nofx-frontend:
build:
context: .
dockerfile: ./docker/Dockerfile.frontend
container_name: nofx-frontend
restart: unless-stopped
ports:
- "${NOFX_FRONTEND_PORT:-3000}:80"
networks:
- nofx-network
depends_on:
- nofx
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
networks:
nofx-network:
driver: bridge