增加固定IP配置。对应修改readme
This commit is contained in:
@@ -28,17 +28,39 @@ https://gitea.io/en-us/
|
||||
|
||||
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的网络设置。
|
||||
7. 执行 docker inspect nginxdocker_nginx_1 来确定nginx所在网络名称:
|
||||
|
||||
8. 启动服务
|
||||
|
||||
9. ```
|
||||
docker-compose up -d
|
||||
```
|
||||
"Networks": {
|
||||
"nginxdocker_default": {
|
||||
```
|
||||
|
||||
10. 参照NginxAndLetsencrypt的sample.conf中的注释说明,获取新创建的container的ip,并返回到gitea.conf中将ip填入。
|
||||
8. 执行 docker network inspect nginxdocker_default 来确定一些网络信息:
|
||||
|
||||
```
|
||||
"IPAM": {
|
||||
"Driver": "default",
|
||||
"Options": null,
|
||||
"Config": [
|
||||
{
|
||||
"Subnet": "192.168.16.0/20",
|
||||
"Gateway": "192.168.16.1"
|
||||
}
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
9. 根据上述两点网络相关的信息修改gitea的docker-compose文件中的对应部分,并指定固定IP。
|
||||
|
||||
9. 将需要nginx代理的应用设置的固定IP填入之前的gitea.conf。
|
||||
|
||||
11. 重启nginx的docker容器。
|
||||
|
||||
12. 启动gitea的docker-compose
|
||||
|
||||
13. ```
|
||||
docker-compose up -d
|
||||
```
|
||||
## 使用说明
|
||||
|
||||
- 配置文件在:/srv/gitea/gitea/gitea/conf下的app.ini
|
||||
@@ -48,4 +70,8 @@ https://gitea.io/en-us/
|
||||
|
||||
## 测试环境
|
||||
|
||||
* CentOS Linux release 7.3.1611 (Core)
|
||||
* CentOS Linux release 7.3.1611 (Core)
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user