feat: 实现Vue驱动的云存储系统初始功能

- 后端: Node.js + Express + SQLite架构
- 前端: Vue 3 + Axios实现
- 功能: 用户认证、文件上传/下载、分享链接、密码重置
- 安全: 密码加密、分享链接过期机制、缓存一致性
- 部署: Docker + Nginx容器化配置
- 测试: 完整的边界测试、并发测试和状态一致性测试
This commit is contained in:
Dev Team
2026-01-20 23:23:51 +08:00
commit b7b00fff48
45 changed files with 51758 additions and 0 deletions

83
docker-compose.yml Normal file
View File

@@ -0,0 +1,83 @@
# ============================================
# 玩玩云 Docker Compose 配置
# ============================================
# 使用方法:
# 1. 复制 backend/.env.example 为 backend/.env 并修改配置
# 2. 运行: docker-compose up -d
# 3. 访问: http://localhost (或配置的域名)
# ============================================
version: '3.8'
services:
# ============================================
# 后端服务
# ============================================
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: wanwanyun-backend
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=40001
# 以下配置建议通过 .env 文件或环境变量设置
# - JWT_SECRET=your-secret-key
# - ADMIN_USERNAME=admin
# - ADMIN_PASSWORD=admin123
env_file:
- ./backend/.env
volumes:
# 数据持久化
- ./backend/data:/app/data
- ./backend/storage:/app/storage
networks:
- wanwanyun-network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:40001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# ============================================
# Nginx 前端服务
# ============================================
nginx:
image: nginx:alpine
container_name: wanwanyun-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
# 前端静态文件
- ./frontend:/usr/share/nginx/html:ro
# Nginx 配置
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# SSL 证书(如有)
- ./nginx/ssl:/etc/nginx/ssl:ro
# Let's Encrypt 证书目录(可选)
# - /etc/letsencrypt:/etc/letsencrypt:ro
# - ./certbot/www:/var/www/certbot:ro
depends_on:
- backend
networks:
- wanwanyun-network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
networks:
wanwanyun-network:
driver: bridge
# ============================================
# 可选: 数据卷(用于更持久的数据存储)
# ============================================
# volumes:
# wanwanyun-data:
# wanwanyun-storage: