This commit is contained in:
vipg
2025-12-19 12:47:34 +08:00
parent 2130000c4e
commit 285f313cf8
6 changed files with 16 additions and 22 deletions

21
.env
View File

@@ -1,21 +0,0 @@
# 数据库配置
DB_USER=postgres
DB_PASSWORD=postgres12341234
DB_NAME=postgres
DB_PORT=5432
DB_SSL_MODE=disable
DB_MAX_OPEN_CONNS=25
DB_MAX_IDLE_CONNS=25
DB_TIMEOUT=30s
# 时区配置
TZ=Asia/Shanghai
# 网关端口
PORT=80
# 日志配置
LOG_LEVEL=info
# Gin模式 (debug/release/test)
GIN_MODE=release

View File

@@ -19,7 +19,7 @@ services:
- ai-trading-network
cn_futures_trading_records:
image: rust:1.92.0-alpine3.23
build: services/cn_futures_trading_records
container_name: cn_futures_trading_records_api
restart: always
ports:
@@ -32,6 +32,7 @@ services:
DATABASE_URL: postgres://postgres:postgres12341234@postgres:5432/postgres
RUST_LOG: info
TZ: Asia/Shanghai
networks:
ai-trading-network:
driver: bridge

View File

@@ -0,0 +1,14 @@
[package]
name = "cn_futures_trading_records"
version = "1.0.0"
edition = "2025"
[dependencies]
axum = "0.7"
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "uuid"] }
uuid = { version = "1", features = ["v4"] }
serde = { version = "1", features = ["derive"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = "1"