Add deployment script and documentation

This commit is contained in:
2026-01-28 09:41:46 +00:00
parent ec413cb712
commit 3f3d6ef12b
2 changed files with 72 additions and 0 deletions

35
DEPLOYMENT.md Normal file
View File

@@ -0,0 +1,35 @@
# 井字过三关游戏 - 部署文档
## 部署说明
### 自动部署
使用提供的部署脚本进行自动部署:
```bash
./deploy.sh
```
### 手动部署
1. 将项目文件复制到Web服务器目录通常是 `/var/www/html/`
2. 确保Web服务器有适当的读取权限
3. 访问 `http://<server-ip>/tic-tac-toe/` 来玩这个游戏
## 内网访问
游戏已部署到内网,可以通过以下地址访问:
- http://192.168.120.110/tic-tac-toe/
## 服务器要求
- Web服务器 (Apache, Nginx, 或其他支持静态文件服务的服务器)
- 无需后端,纯前端应用
- 支持现代浏览器 (Chrome, Firefox, Safari, Edge)
## 验证部署
1. 检查页面是否正确加载
2. 测试游戏功能是否正常
3. 验证分数统计是否正常工作
4. 测试响应式设计在移动设备上是否正常
## 维护
- 游戏数据存储在本地浏览器中 (localStorage)
- 不需要数据库或其他后端服务
- 更新只需替换文件即可