Files
gitea-docker/README.md

48 lines
785 B
Markdown
Raw Permalink 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:31337
- **SSH Git**: localhost:31338
## 常用命令
```bash
# 啟動服務
./start.sh
# 停止服務
docker-compose down
# 查看日誌
docker-compose logs -f
# 重啟服務
docker-compose restart
```
## 數據存儲
所有 Gitea 數據存儲在 `./data` 目錄下,包含:
- Git repositories
- 配置文件
- 用戶上傳的文件
PostgreSQL 數據存儲在 `./postgres` 目錄下。
## 首次設置
1. 啟動服務後訪問 http://localhost:31337
2. 數據庫已自動配置PostgreSQL
3. 設置管理員帳號
4. 完成!
## 備份
定期備份 `./data` 目錄即可:
```bash
tar -czf gitea-backup-$(date +%Y%m%d).tar.gz data/
```