chore: 重组项目文件结构,文档和部署文件归档

文件结构优化:
- docs/ 归档所有项目文档(PROJECT.md, PROJECT_ISSUES.md 等)
- deploy/ 归档所有部署相关文件(docker-compose.prod.yml, nginx 配置等)
- scripts/ 归档脚本文件(deploy.sh, rollback.sh)
- tests/ 归档测试文件(test_data.php)

更新引用路径:
- CLAUDE.md 更新文档路径引用
- 部署文档更新配置文件路径引用

清理文件:
- 移除非必要的测试文件(TestController, 测试脚本等)
- 移除重复/错误的目录

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-27 18:01:17 +08:00
parent 1004aea725
commit 4ceb5eac7e
18 changed files with 4982 additions and 4 deletions
+58
View File
@@ -0,0 +1,58 @@
# X-Server Mobile 生产环境 Docker Compose
# 使用方法: docker-compose -f docker-compose.prod.yml up -d
services:
# PHP 后端服务
backend:
build:
context: ./backend
dockerfile: Dockerfile.prod
container_name: x-server-backend-prod
restart: unless-stopped
ports:
- "8787:8787"
environment:
# 应用环境
- APP_ENV=production
- APP_DEBUG=false
# 数据库配置(使用 1Panel 的 MySQL)
# 注意:请替换为实际的容器名和密码
- DB_HOST=1Panel-mysql-409s
- DB_PORT=3306
- DB_DATABASE=xserver
- DB_USERNAME=xserver
- DB_PASSWORD=${DB_PASSWORD:-change_me_in_production}
# Redis 配置(使用 1Panel 的 Redis)
# 注意:请替换为实际的容器名和密码
- REDIS_HOST=1Panel-redis-xxxx
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-change_me_in_production}
# 飞书配置(请替换为实际值)
- FEISHU_APP_ID=${FEISHU_APP_ID}
- FEISHU_APP_SECRET=${FEISHU_APP_SECRET}
- FEISHU_ENCRYPT_KEY=${FEISHU_ENCRYPT_KEY}
- FEISHU_VERIFICATION_TOKEN=${FEISHU_VERIFICATION_TOKEN}
- FEISHU_TENANT_KEY=${FEISHU_TENANT_KEY:-14e7bc0fe5985740}
volumes:
- ./backend:/app
- ./logs/backend:/app/runtime/logs
networks:
- 1panel-network
healthcheck:
test: ["CMD", "php", "-r", "exit(0);"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
1panel-network:
external: true