Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: how to custom service uri when use database-discovery #4743

Merged
merged 4 commits into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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