feat: production branch with deploy config for baota panel

- Add deploy/ directory with production env, supervisor, nginx, migration configs
- Include all latest features: admin management, feedback, footer with ICP/beian
- Database: foreign_trade (PostgreSQL), user: foreign_trade
- Frontend: trade.yuzhiran.com, backend proxy via Nginx
This commit is contained in:
TradeMate Dev
2026-05-14 09:19:30 +08:00
parent 23a31f7c00
commit 5a1af9f82f
15 changed files with 1377 additions and 71 deletions
+59
View File
@@ -0,0 +1,59 @@
# 生产环境配置(基于宝塔面板 PostgreSQL foreign_trade 数据库)
APP_NAME=TradeMate
SECRET_KEY=change-this-to-a-random-secret-key
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
REFRESH_TOKEN_EXPIRE_DAYS=30
# 数据库(foreign_trade
DATABASE_URL=postgresql+asyncpg://foreign_trade:dWFNi67nHNbPbjmP@localhost:5432/foreign_trade
# Redis(宝塔自带,默认端口)
REDIS_URL=redis://localhost:6379/0
# Celery
CELERY_BROKER_URL=redis://localhost:6379/1
CELERY_RESULT_BACKEND=redis://localhost:6379/2
# AI 提供商(按需填入)
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
DEEPL_API_KEY=
SENSENOVA_API_KEY=
SENSENOVA_BASE_URL=https://token.sensenova.cn/v1
SENSENOVA_MODEL=sensenova-6.7-flash-lite
IFLYTEK_API_KEY=
IFLYTEK_API_BASE=https://maas-api.cn-huabei-1.xf-yun.com/v2
IFLYTEK_MODEL=astron-code-latest
LOCAL_MODEL_ENABLED=false
LOCAL_MODEL_URL=http://localhost:8001
# WhatsApp Cloud API
WHATSAPP_API_TOKEN=
WHATSAPP_PHONE_NUMBER_ID=
WHATSAPP_WEBHOOK_VERIFY_TOKEN=
# 微信
WECHAT_APP_ID=
WECHAT_APP_SECRET=
# 汇率 API
EXCHANGE_RATE_API_KEY=
# 文件存储
UPLOAD_DIR=./uploads
MAX_UPLOAD_SIZE=10485760
# 错误监控 (Sentry)
SENTRY_DSN=
DEBUG=false
# URL(以宝塔实际域名/端口为准)
FRONTEND_URL=https://trade.yuzhiran.com
BACKEND_URL=https://api.trade.yuzhiran.com
# 数据库调试关闭
DB_ECHO=false
+13
View File
@@ -0,0 +1,13 @@
[program:trademate-backend]
command=/www/server/panel/pyenv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2 --proxy-headers --forwarded-allow-ips='*'
directory=/www/wwwroot/trade.yuzhiran.com/backend
user=www
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stdout_logfile=/www/wwwlogs/trademate-backend.log
stderr_logfile=/www/wwwlogs/trademate-backend.error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
environment=PATH="/www/server/panel/pyenv/bin:/usr/local/bin:/usr/bin:/bin",HOME="/home/www"