Files
Deployments/Gitea/README.md
2020-04-26 14:39:13 +08:00

50 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
## 官网
https://gitea.io/en-us/
## 用途
低配置要求的Gitlab替代。
## 文件说明
* `docker-compose.yml`:服务配置;
## 安装说明
1. 解析域名到你的服务器;
2. 安装docker-compose参考 <a href="https://www.4spaces.org/centos-install-docker-compose/" target="_blank">CENTOS安装Docker Compose</a>
3. 完成NginxAndLetsencrypt的部署
参见相关说明。包含把sample.conf改名为gitea.conf或其他名字
4. 在/srv下复制gitea目录。cd进gitea
5. 在/srv/gitea下chmod +x ./grant-permissions.sh
6. 执行该sh脚本。注意可以通过tail -2 /etc/passwd和tail -2 /etc/group 查看新注册用户的uid和gid。如和docker-compose.yml中的不符合则应修改yml文件。
7. 参照NginxAndLetsencrypt的sample.conf中的注释说明和sampleApp中的compose文件修改docker-compose.yml的网络设置。
8. 启动服务
9. ```
docker-compose up -d
```
10. 参照NginxAndLetsencrypt的sample.conf中的注释说明获取新创建的container的ip并返回到gitea.conf中将ip填入。
11. 重启nginx的docker容器。
## 使用说明
配置文件在:/srv/gitea/gitea/gitea/conf下的app.ini
邮件smtp服务器要带端口号通常是25
## 测试环境
* CentOS Linux release 7.3.1611 (Core)