Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
infrastructure-dev
Project
Project
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
common
infrastructure-dev
Commits
450f6920
Commit
450f6920
authored
Oct 30, 2019
by
李念辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat]
#7
添加
https://git.i-counting.cn/pilipa/config-repo
parent
f93b71e7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
38 deletions
+15
-38
.gitmodules
.gitmodules
+3
-0
README.md
README.md
+9
-36
Dockerfile
config-server/Dockerfile
+2
-0
config-repo
config-server/config-repo
+1
-0
docker-compose.yml
docker-compose.yml
+0
-2
No files found.
.gitmodules
0 → 100644
View file @
450f6920
[submodule "config-server/config-repo"]
path = config-server/config-repo
url = git@git.i-counting.cn:pilipa/config-repo.git
README.md
View file @
450f6920
# 介绍
这是帮助你快速启动Spring Cloud开发环境的docker配置仓库.
这个环境包括如下服务:
```
sh
# 加载https://git.i-counting.cn/pilipa/config-repo
git submodule update
-
Mongo DB 3.4.10
-
Redis 3.2
-
RabbitMQ 3.6 with
`stomp`
and
`shovel`
plugins
-
Spring Cloud
-
config-server
-
eureka-server
# 启动
docker-compose up
-d
## 使用前提
1.
安装
[
Docker 17+
](
https://www.docker.com
)
2.
安装
[
Docker Compose
](
https://docs.docker.com/compose/install/#prerequisites
)
3.
新建
`.env`
文件:配置config-server的文件仓库
```
ini
configRepo
=
本地configRepo的绝对地址
```
# 停止
docker-compose down
## 使用方式
### 启动 `docker-compose up -d`
eureka-server需要依赖config-server的成功启动,所以**eureka-server需要等待一段时间后才能正常启动**。
### 销毁环境 `docker-compose down`
### 查看服务运行情况参考`docker-compose help`
## 运行数据
默认情况下,环境销毁后数据会丢失,使用下面的方法可以把数据保存在本地
```
docker volume create --opt type=none --opt device=
<absolute
path
of
host
>
--opt o=bind --name mongo_data
```
Update `docker-compose.yml` as below,
```
volumes:
redis_data:
mongo_data:
external: true
# 帮助
docker-compose
help
```
config-server/Dockerfile
View file @
450f6920
...
...
@@ -11,3 +11,5 @@ ENV ENCRYPT_KEY_STORE_ALIAS=configserver
ENV
ENCRYPT_KEY_STORE_SECRET=changeme
ENV
JAVA_OPTIONS="-server -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/pilipa/ -Duser.timezone=Asia/Hong_Kong"
ENV
spring.rabbitmq.addresses=rabbit:5672
COPY
config-repo/ /Users/kane/git/pilipa/config-repo
\ No newline at end of file
config-repo
@
b7933f29
Subproject commit b7933f294ddd6eb6d75ee5c9c5310223299a6e89
docker-compose.yml
View file @
450f6920
...
...
@@ -17,8 +17,6 @@ services:
ports
:
-
"
8888:8888"
-
"
8889:8889"
volumes
:
-
${configRepo}:/Users/kane/git/pilipa/config-repo
mongo
:
build
:
./mongo/
...
...
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