aiosqlite, cryptography, hyperliquid-python-sdk

This commit is contained in:
k
2026-04-21 19:45:49 +08:00
parent 3056635a5c
commit 3f901df82b
3 changed files with 27 additions and 4 deletions
+10 -3
View File
@@ -1,13 +1,20 @@
FROM python:3.11-slim
# System deps
# System deps needed for native extensions:
# gcc, libpq-dev → asyncpg (Postgres driver)
# libffi-dev → cryptography
# build-essential → general C compilation fallback
# curl → healthcheck probe
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libpq-dev curl \
gcc build-essential libpq-dev libffi-dev curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first (layer cache)
# Upgrade pip + install wheel first so pre-built wheels are preferred
RUN pip install --no-cache-dir --upgrade pip wheel setuptools
# Install Python deps (separate layer for cache efficiency)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
+15
View File
@@ -0,0 +1,15 @@
1. 填 backend .env(生产值):
POSTGRES_PASSWORD=强密码
FRONTEND_URL=https://你的前端域名
ENCRYPTION_KEY=之前生成的那个
AI_API_KEY=sk-...
ENVIRONMENT=production
2. 改前端 .env.local
NEXT_PUBLIC_API_URL=https://api.你的域名.com
NEXT_PUBLIC_WS_URL=wss://api.你的域名.com
启动:
cd backend
docker compose up -d
+2 -1
View File
@@ -1,6 +1,7 @@
fastapi==0.111.0
uvicorn[standard]==0.29.0
sqlalchemy[asyncio]==2.0.30
aiosqlite==0.20.0
asyncpg==0.29.0
alembic==1.13.1
pydantic==2.7.1
@@ -14,4 +15,4 @@ eth-account==0.11.0
redis==5.0.4
apscheduler==3.10.4
python-dotenv==1.0.1
cryptography>=42
cryptography==42.0.8