- 文件上传验证: ModelUploader组件增强、上传API错误处理 - GLTF解析器: 增强节点提取和元数据 - 板材编辑: PanelEditor客户端验证 + panels API服务端验证 - 装配步骤编辑: 修复未使用代码,添加预览按钮 - 装配动画播放: AssemblyPlayer步骤导航边界检查优化 - 分享链接: 完整CRUD API(创建、获取、删除),含验证和过期检查 跳过可选测试任务以加快MVP开发
112 lines
2.6 KiB
YAML
112 lines
2.6 KiB
YAML
# 3D 家具安装展示系统 - 测试配置
|
|
# 用于测试部署脚本,使用简化的服务配置
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL 数据库
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: furniture-postgres-test
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_DB=furniture_db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-test_password_123}
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
command: >
|
|
postgres
|
|
-c shared_buffers=128MB
|
|
-c max_connections=50
|
|
volumes:
|
|
- postgres-test-data:/var/lib/postgresql/data
|
|
networks:
|
|
- furniture-test-network
|
|
ports:
|
|
- "5432:5432"
|
|
mem_limit: 512m
|
|
cpus: 1.0
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d furniture_db"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# MinIO 对象存储
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: furniture-minio-test
|
|
restart: unless-stopped
|
|
environment:
|
|
- MINIO_ROOT_USER=${MINIO_USER:-admin}
|
|
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD:-test_minio_password_123}
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio-test-data:/data
|
|
networks:
|
|
- furniture-test-network
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
mem_limit: 512m
|
|
cpus: 0.5
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
# Redis 缓存
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: furniture-redis-test
|
|
restart: unless-stopped
|
|
command: >
|
|
redis-server
|
|
--maxmemory 200mb
|
|
--maxmemory-policy allkeys-lru
|
|
volumes:
|
|
- redis-test-data:/data
|
|
networks:
|
|
- furniture-test-network
|
|
ports:
|
|
- "6379:6379"
|
|
mem_limit: 256m
|
|
cpus: 0.5
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
# Nginx 测试服务 (模拟前端)
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: furniture-nginx-test
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${WEB_PORT:-3000}:80"
|
|
networks:
|
|
- furniture-test-network
|
|
mem_limit: 128m
|
|
cpus: 0.5
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
volumes:
|
|
- ./test-html:/usr/share/nginx/html:ro
|
|
|
|
networks:
|
|
furniture-test-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres-test-data:
|
|
driver: local
|
|
minio-test-data:
|
|
driver: local
|
|
redis-test-data:
|
|
driver: local
|