Skip to content

Commit

Permalink
docs: how to custom service uri when use database-discovery (#4743)
Browse files Browse the repository at this point in the history
* docs: custom service uri when use database-discovery

* Update docs/en/deployment/distributed-deployment-guide.md

Co-authored-by: Jason Song <nobodyiam@gmail.com>

* Update docs/en/deployment/distributed-deployment-guide.md

Co-authored-by: Jason Song <nobodyiam@gmail.com>

* Update docs/zh/deployment/distributed-deployment-guide.md

Co-authored-by: Jason Song <nobodyiam@gmail.com>

---------

Co-authored-by: Jason Song <nobodyiam@gmail.com>
  • Loading branch information
Anilople and nobodyiam authored Feb 26, 2023
1 parent 0bf1028 commit 2dcbc1d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/en/deployment/distributed-deployment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,20 @@ Apollo supports the use of internal database table as registry, without relying
spring.profiles.active=github,database-discovery
```

2. In multi-cluster deployments, if you want apollo client only read Config Service in the same cluster,
2. (optional) In multi-cluster deployments, if you want apollo client only read Config Service in the same cluster,
you can add a property in `config/application-github.properties` of the Config Service and Admin Service installation package
```properties
apollo.service.registry.cluster=same name with apollo Cluster
```

2. (optional) If you want to customize Config Service and Admin Service's uri for Client,
for example when deploying on the intranet,
if you don't want to expose the intranet ip,
you can add a property in `config/application-github.properties` of the Config Service and Admin Service installation package
```properties
apollo.service.registry.uri=http://your-ip-or-domain:${server.port}/
```

## 2.3 Docker Deployment

### 2.3.1 Version 1.7.0 and above
Expand Down
11 changes: 9 additions & 2 deletions docs/zh/deployment/distributed-deployment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ apollo.config-service.url=http://apollo-config-service
apollo.admin-service.url=http://apollo-admin-service
```

##### 2.2.3.5.2 2.1.0 之前的版本
##### 2.2.3.4.2 2.1.0 之前的版本

> 注意:需要重新打包
Expand Down Expand Up @@ -709,13 +709,20 @@ Apollo支持使用内部的数据库表作为注册中心,不依赖第三方
spring.profiles.active=github,database-discovery
```

2. 在多机房部署时,
2. (可选)在多机房部署时,
如果你需要apollo客户端只读取同机房内的Config Service,
你可以在Config Service和Admin Service安装包中`config/application-github.properties`新增一条配置
```properties
apollo.service.registry.cluster=与apollo的Cluster同名
```

3. (可选)如果你希望自定义Config Service和Admin Service给Client使用的uri,
例如在内网部署时,
如果不希望暴露内网ip,
你可以在Config Service和Admin Service安装包中`config/application-github.properties`新增一条配置
```properties
apollo.service.registry.uri=http://你的ip或者域名:${server.port}/
```

## 2.3 Docker部署
### 2.3.1 1.7.0及以上版本
Expand Down

0 comments on commit 2dcbc1d

Please sign in to comment.