feat: Go 重写后端,替换 Python FastAPI

用 Go (Gin + GORM + SQLite) 重写整个后端:
- 单二进制部署,不依赖 Python/pip/SDK
- net/http 原生客户端,无 Cloudflare TLS 指纹问题
- 多阶段 Dockerfile:Node 构建前端 + Go 构建后端 + Alpine 运行
- 内存占用从 ~95MB 降至 ~3MB
- 完整保留所有 API 路由、JWT 认证、API Key 权限、审计日志
This commit is contained in:
zqq61
2026-03-16 02:11:48 +08:00
parent e897c99f59
commit faba565c66
34 changed files with 2430 additions and 17 deletions

View File

@@ -1,11 +1,9 @@
version: "3.8"
services:
backend:
app:
build:
context: .
dockerfile: backend/Dockerfile
container_name: airwallex-backend
dockerfile: Dockerfile
container_name: airwallex-admin
ports:
- "8000:8000"
volumes:
@@ -13,18 +11,7 @@ services:
env_file:
- backend/.env
environment:
- DATABASE_URL=sqlite:///./data/airwallex.db
restart: unless-stopped
frontend:
build:
context: frontend
dockerfile: Dockerfile
container_name: airwallex-frontend
ports:
- "3000:3000"
depends_on:
- backend
- GIN_MODE=release
restart: unless-stopped
volumes: