Commit 450f6920 authored by 李念辉's avatar 李念辉
parent f93b71e7
[submodule "config-server/config-repo"]
path = config-server/config-repo
url = git@git.i-counting.cn:pilipa/config-repo.git
# 介绍
这是帮助你快速启动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
```
......@@ -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
......@@ -17,8 +17,6 @@ services:
ports:
- "8888:8888"
- "8889:8889"
volumes:
- ${configRepo}:/Users/kane/git/pilipa/config-repo
mongo:
build: ./mongo/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment