50 lines
1.3 KiB
Markdown
50 lines
1.3 KiB
Markdown
# 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) |