Initial commit: Gitea Docker setup
This commit is contained in:
46
README.md
Normal file
46
README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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/
|
||||
```
|
||||
Reference in New Issue
Block a user