Initial commit: TradeMate 外贸小助手 MVP

项目结构:
- backend/     Python FastAPI 后端
- uni-app/     uni-app跨端前端
- docs/        设计文档
- docker-compose.yml  Docker编排
- nginx/scripts/systemd 运维配置

已完成功能:
- 用户认证 (JWT)
- 智能翻译 + 回复建议
- 营销素材生成
- 客户管理 + 沉默检测
- 报价单管理
- 产品库管理
- 汇率换算
- 推送通知 (uni-push)
- WhatsApp Webhook框架
- Celery定时任务
This commit is contained in:
TradeMate Dev
2026-05-08 18:17:12 +08:00
commit c6206787da
121 changed files with 11743 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
version: '3.8'
services:
postgres:
image: pgvector/pgvector:pg15
container_name: tradmate-postgres
environment:
POSTGRES_DB: tradmate
POSTGRES_USER: tradmate
POSTGRES_PASSWORD: tradmate
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tradmate"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: tradmate-redis
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tradmate-backend
env_file:
- ./backend/.env
ports:
- "8000:8000"
volumes:
- ./backend:/app
- uploads_data:/app/uploads
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
celery-worker:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tradmate-celery
env_file:
- ./backend/.env
volumes:
- ./backend:/app
depends_on:
- redis
- postgres
command: celery -A app.celery_app worker --loglevel=info
celery-beat:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tradmate-celery-beat
env_file:
- ./backend/.env
volumes:
- ./backend:/app
depends_on:
- redis
- postgres
command: celery -A app.celery_app beat --loglevel=info
volumes:
postgres_data:
redis_data:
uploads_data:
networks:
default:
name: tradmate-network