mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
feat: add one-click install and simplify README
- Add docker-compose.prod.yml with env_file support - Add install.sh with auto-generated encryption keys - Remove API endpoints and recommendations from README - Add multi-language links to README
This commit is contained in:
62
docker-compose.prod.yml
Normal file
62
docker-compose.prod.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
# NOFX Production Deployment
|
||||
# 用户部署专用 - 使用官方预构建镜像
|
||||
#
|
||||
# 一键部署命令:
|
||||
# curl -fsSL https://raw.githubusercontent.com/NoFxAiOS/nofx/main/install.sh | bash
|
||||
#
|
||||
# 或手动部署:
|
||||
# curl -O https://raw.githubusercontent.com/NoFxAiOS/nofx/main/docker-compose.prod.yml
|
||||
# docker compose -f docker-compose.prod.yml up -d
|
||||
|
||||
services:
|
||||
nofx:
|
||||
image: ghcr.io/nofxaios/nofx/nofx-backend:latest
|
||||
container_name: nofx-trading
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 30s
|
||||
ports:
|
||||
- "${NOFX_BACKEND_PORT:-8080}:8080"
|
||||
volumes:
|
||||
- nofx-data:/app/data
|
||||
- nofx-logs:/app/decision_logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- TZ=${TZ:-Asia/Shanghai}
|
||||
- AI_MAX_TOKENS=4000
|
||||
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
|
||||
|
||||
nofx-frontend:
|
||||
image: ghcr.io/nofxaios/nofx/nofx-frontend:latest
|
||||
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
|
||||
|
||||
volumes:
|
||||
nofx-data:
|
||||
name: nofx-data
|
||||
nofx-logs:
|
||||
name: nofx-logs
|
||||
Reference in New Issue
Block a user