Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
233ab8a0
Commit
233ab8a0
authored
Aug 01, 2017
by
Jason Song
Committed by
GitHub
Aug 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docker.md
parent
5fa12ded
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
40 deletions
+2
-40
docker.md
docker.md
+2
-40
No files found.
docker.md
View file @
233ab8a0
# Apollo for Docker
# Apollo for Docker
Quick Start
### 修改明细
请参考
[
Apollo Quick Start Docker部署
](
https://github.com/ctripcorp/apollo/wiki/Apollo-Quick-Start-Docker%E9%83%A8%E7%BD%B2
)
1、在apollo-configservice、apollo-adminservice、apollo-portal模块中分别添加了
`src/main/docker/Dockerfile`
以及在
`pom.xml`
中添加了
`docker-maven-plugin`
插件
2、docker环境上的sql脚本
`scripts/sql-docker`
修改apolloconfigdb.sql数据库脚本中的
`eureka.service.url`
为
`http://apollo-configservice:8080/eureka/`
3、添加了
`Docker`
环境示例代码
`apollo-spring-boot-sample`
4、添加
`docker-compose.yml`
文件
5、添加
`run.sh`
脚本
### 如何使用
克隆项目,在项目根目录下执行
`./run.sh`
,该过程涉及编译、打包、构建镜像会比较漫长
数据库已经映射到宿主机的
`3306`
端口,用户名密码为
`root/root`
Apollo配置中心 http://localhost:9090
Eureka注册中心 http://localhost:8080
apollo-spring-boot-sample 示例应用演示与配置
在Apollo配置中心中创建应用
`apollo-spring-boot-sample`
,其应用id与
`/apollo-spring-boot-sample/src/main/resources/META-INF/app.properties`
中的内容一致。配置中心中具体的键值对请参考源码。
http://localhost:9190/clientapi
使用Config API方式实时同步属性值
http://localhost:9190/javaconfig
使用Config API方式实时同步属性值,注入@ApolloConfig和@ApolloConfigChangeListener
http://localhost:9190/configuration
使用Spring Boot ConfigurationProperties方式,没有使用Config API,但使用了Spring Cloud的@RefreshScope注解,执行/refresh端点时会刷新属性的值。Apollo配置中心的值修改后,需要执行
`curl -X POST http://localhost:9190/refresh`
,才能使其生效。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment