File tree Expand file tree Collapse file tree 1 file changed +2
-40
lines changed
Expand file tree Collapse file tree 1 file changed +2
-40
lines changed Original file line number Diff line number Diff line change 1- # Apollo for Docker
1+ # Apollo for Docker Quick Start
22
3- ### 修改明细
4-
5- 1、在apollo-configservice、apollo-adminservice、apollo-portal模块中分别添加了` src/main/docker/Dockerfile ` 以及在` pom.xml ` 中添加了` docker-maven-plugin ` 插件
6-
7- 2、docker环境上的sql脚本` scripts/sql-docker `
8-
9- 修改apolloconfigdb.sql数据库脚本中的` eureka.service.url ` 为` http://apollo-configservice:8080/eureka/ `
10-
11- 3、添加了` Docker ` 环境示例代码` apollo-spring-boot-sample `
12-
13- 4、添加` docker-compose.yml ` 文件
14-
15- 5、添加` run.sh ` 脚本
16-
17- ### 如何使用
18-
19- 克隆项目,在项目根目录下执行` ./run.sh ` ,该过程涉及编译、打包、构建镜像会比较漫长
20-
21- 数据库已经映射到宿主机的` 3306 ` 端口,用户名密码为` root/root `
22-
23- Apollo配置中心 http://localhost:9090
24-
25- Eureka注册中心 http://localhost:8080
26-
27- apollo-spring-boot-sample 示例应用演示与配置
28-
29- 在Apollo配置中心中创建应用` apollo-spring-boot-sample ` ,其应用id与` /apollo-spring-boot-sample/src/main/resources/META-INF/app.properties ` 中的内容一致。配置中心中具体的键值对请参考源码。
30-
31- http://localhost:9190/clientapi
32-
33- 使用Config API方式实时同步属性值
34-
35- http://localhost:9190/javaconfig
36-
37- 使用Config API方式实时同步属性值,注入@ApolloConfig 和@ApolloConfigChangeListener
38-
39- http://localhost:9190/configuration
40-
41- 使用Spring Boot ConfigurationProperties方式,没有使用Config API,但使用了Spring Cloud的@RefreshScope 注解,执行/refresh端点时会刷新属性的值。Apollo配置中心的值修改后,需要执行` curl -X POST http://localhost:9190/refresh ` ,才能使其生效。
3+ 请参考[ Apollo Quick Start Docker部署] ( https://github.com/ctripcorp/apollo/wiki/Apollo-Quick-Start-Docker%E9%83%A8%E7%BD%B2 )
You can’t perform that action at this time.
0 commit comments