1
This commit is contained in:
parent
211cc69081
commit
f88fc8bac5
@ -8,7 +8,7 @@ REDIS_DB=0
|
||||
|
||||
# API配置
|
||||
API_HOST=0.0.0.0
|
||||
API_PORT=8090
|
||||
API_PORT=8050
|
||||
|
||||
# 数据库配置(可选)
|
||||
# DATABASE_URL=sqlite:///./stockagent.db
|
||||
|
||||
@ -9,21 +9,21 @@ services:
|
||||
container_name: stockagent-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8090:8090"
|
||||
- "8050:8050"
|
||||
environment:
|
||||
- TUSHARE_TOKEN=${TUSHARE_TOKEN}
|
||||
- REDIS_HOST=host.docker.internal # 连接到宿主机的Redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_DB=0 # 可以使用不同的数据库编号避免冲突
|
||||
- API_HOST=0.0.0.0
|
||||
- API_PORT=8090
|
||||
- API_PORT=8050
|
||||
volumes:
|
||||
- ./logs:/app/logs
|
||||
- ./config:/app/config
|
||||
networks:
|
||||
- stockagent-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8090/"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8050/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@ -41,7 +41,7 @@ services:
|
||||
ports:
|
||||
- "5001:5001"
|
||||
environment:
|
||||
- API_BASE_URL=http://backend:8090/api
|
||||
- API_BASE_URL=http://backend:8050/api
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
|
||||
@ -59,7 +59,7 @@ services:
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_DB=0
|
||||
- API_HOST=0.0.0.0
|
||||
- API_PORT=8090
|
||||
- API_PORT=8050
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
- ./logs:/app/logs
|
||||
@ -70,7 +70,7 @@ services:
|
||||
networks:
|
||||
- stockagent-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8090/"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8050/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@ -94,7 +94,7 @@ services:
|
||||
expose:
|
||||
- "5001"
|
||||
environment:
|
||||
- API_BASE_URL=http://backend:8090/api
|
||||
- API_BASE_URL=http://backend:8050/api
|
||||
- FLASK_ENV=production
|
||||
depends_on:
|
||||
backend:
|
||||
|
||||
@ -27,14 +27,14 @@ services:
|
||||
container_name: stockagent-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8090:8090"
|
||||
- "8050:8050"
|
||||
environment:
|
||||
- TUSHARE_TOKEN=${TUSHARE_TOKEN}
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_DB=0
|
||||
- API_HOST=0.0.0.0
|
||||
- API_PORT=8090
|
||||
- API_PORT=8050
|
||||
volumes:
|
||||
- ./logs:/app/logs
|
||||
- ./config:/app/config
|
||||
@ -44,7 +44,7 @@ services:
|
||||
networks:
|
||||
- stockagent-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8090/"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8050/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@ -60,7 +60,7 @@ services:
|
||||
ports:
|
||||
- "5001:5001"
|
||||
environment:
|
||||
- API_BASE_URL=http://backend:8090/api
|
||||
- API_BASE_URL=http://backend:8050/api
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
||||
@ -46,7 +46,7 @@ http {
|
||||
}
|
||||
|
||||
upstream api {
|
||||
server backend:8090;
|
||||
server backend:8050;
|
||||
}
|
||||
|
||||
# HTTP服务器配置
|
||||
|
||||
Loading…
Reference in New Issue
Block a user