-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (106 loc) · 3.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
120 lines (106 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: '3.8'
services:
# MongoDB Database
mongodb:
image: mongo:7.0
container_name: nasdaq-agent-mongodb
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: nasdaq_stock_agent
volumes:
- mongodb_data:/data/db
- mongodb_config:/data/configdb
networks:
- nasdaq-network
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
# NASDAQ Stock Agent
nasdaq-agent:
build:
context: .
dockerfile: Dockerfile
container_name: nasdaq-stock-agent
restart: unless-stopped
ports:
- "8000:8000" # FastAPI
- "6000:6000" # NEST A2A
environment:
# Anthropic Configuration
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
ANTHROPIC_MODEL: ${ANTHROPIC_MODEL:-claude-3-haiku-20240307}
# MongoDB Configuration
MONGODB_URL: mongodb://mongodb:27017/
MONGODB_DATABASE: nasdaq_stock_agent
# Application Configuration
APP_NAME: NASDAQ Stock Agent
APP_VERSION: 1.0.0
DEBUG: ${DEBUG:-false}
HOST: 0.0.0.0
PORT: 8000
# Cache Configuration
CACHE_TTL_SECONDS: 300
# Logging Configuration
LOG_RETENTION_DAYS: 30
# Rate Limiting
RATE_LIMIT_REQUESTS: 100
MAX_CONCURRENT_REQUESTS: 50
# YFinance Configuration
YFINANCE_TIMEOUT: 30
# MCP Server Configuration
MCP_ENABLED: ${MCP_ENABLED:-false}
MCP_HOST: 0.0.0.0
MCP_PORT: 8001
# NEST Framework Configuration
NEST_ENABLED: ${NEST_ENABLED:-false}
NEST_AGENT_ID: ${NEST_AGENT_ID:-nasdaq-stock-agent}
NEST_AGENT_NAME: ${NEST_AGENT_NAME:-NASDAQ Stock Agent}
NEST_PORT: 6000
NEST_PUBLIC_URL: ${NEST_PUBLIC_URL}
NEST_REGISTRY_URL: ${NEST_REGISTRY_URL:-http://registry.chat39.com:6900}
NEST_MCP_REGISTRY_URL: ${NEST_MCP_REGISTRY_URL}
NEST_TELEMETRY: ${NEST_TELEMETRY:-true}
NEST_DUAL_MODE: ${NEST_DUAL_MODE:-false}
NEST_DOMAIN: ${NEST_DOMAIN:-financial analysis}
NEST_SPECIALIZATION: ${NEST_SPECIALIZATION:-NASDAQ stock analysis and investment recommendations}
volumes:
- ./logs:/app/logs
- ./data:/app/data
depends_on:
mongodb:
condition: service_healthy
networks:
- nasdaq-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: NANDA Registry (if using NEST integration)
# Uncomment if you want to run a local registry
# nanda-registry:
# image: nanda/registry:latest
# container_name: nanda-registry
# restart: unless-stopped
# ports:
# - "6900:6900"
# networks:
# - nasdaq-network
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:6900/health"]
# interval: 30s
# timeout: 10s
# retries: 3
networks:
nasdaq-network:
driver: bridge
volumes:
mongodb_data:
driver: local
mongodb_config:
driver: local