Files
gitea-docker/README.md

47 lines
758 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Gitea Docker Setup
使用 Docker Compose 運行 Gitea Git 服務器。
## 服務訪問
- **Web 界面**: http://localhost:3000
- **SSH Git**: localhost:222
## 常用命令
```bash
# 啟動服務
./start.sh
# 停止服務
docker-compose down
# 查看日誌
docker-compose logs -f
# 重啟服務
docker-compose restart
```
## 數據存儲
所有 Gitea 數據存儲在 `./data` 目錄下,包含:
- Git repositories
- 數據庫(默認使用 SQLite
- 配置文件
- 用戶上傳的文件
## 首次設置
1. 啟動服務後訪問 http://localhost:3000
2. 選擇數據庫類型SQLite3
3. 設置管理員帳號
4. 完成!
## 備份
定期備份 `./data` 目錄即可:
```bash
tar -czf gitea-backup-$(date +%Y%m%d).tar.gz data/
```