This commit is contained in:
vipg
2025-12-19 15:35:28 +08:00
parent 560f5dc54b
commit 99fcb5fdd7
9 changed files with 493 additions and 53 deletions

View File

@@ -9,8 +9,10 @@ services:
entrypoint:
- infra/postgres/scripts/db-lanuch-entrypoint.sh
environment:
POSTGRES_PASSWORD: postgres12341234
TZ: Asia/Shanghai
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
TZ: ${TZ}
volumes:
- ./shared_data/ai_trading_db:/var/lib/postgresql/data
- ./infra/postgres/sql:/docker-entrypoint-initdb.d
@@ -29,9 +31,15 @@ services:
networks:
- ai-trading-network
environment:
DATABASE_URL: postgres://postgres:postgres12341234@postgres:5432/postgres
RUST_LOG: info
TZ: Asia/Shanghai
DB_HOST: postgres
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
TZ: ${TZ}
volumes:
# 挂载添加日志目录挂载,将容器内日志日志目录映射到宿主机的 ./logs 目录
- ./cn_futures_trading_records_logs:/app/logs # 假设代码中日志存储路径为 /app/logs
networks:
ai-trading-network: