Commit f5899a58 authored by lizhuo's avatar lizhuo

use .env & build rabbit image

parent e18dc6bf
MONGO_PORT=27017 configRepo=/Users/lz/proj/config-repo
REDIS_PORT=6379
RABBITMQ_PORT=5672
RABBITMQMG_PORT=15672
\ No newline at end of file
...@@ -13,13 +13,8 @@ ...@@ -13,13 +13,8 @@
## 使用前提 ## 使用前提
1. 安装[Docker 17+](https://www.docker.com) 1. 安装[Docker 17+](https://www.docker.com)
2. 安装[Docker Compose](https://docs.docker.com/compose/install/#prerequisites) 2. 安装[Docker Compose](https://docs.docker.com/compose/install/#prerequisites)
3. 构建rabbitmq image 3. 在`.env`里配置config-server的文件仓库
```
cd rabbitmq
./build.sh
```
4. 在`docker-compose.yml`里配置config-server的配置文件仓库
## 使用方式 ## 使用方式
### 启动 `docker-compose up -d` ### 启动 `docker-compose up -d`
eureka-server需要等待config-server成功启动才能起来,而目前两个服务时同时起的, eureka-server需要等待config-server成功启动才能起来,而目前两个服务时同时起的,
......
...@@ -19,7 +19,7 @@ services: ...@@ -19,7 +19,7 @@ services:
- "8889:8889" - "8889:8889"
volumes: volumes:
# 替换成本地config-repo仓库地址 # 替换成本地config-repo仓库地址
- /Users/lz/proj/config-repo:/Users/kane/git/pilipa/config-repo - ${configRepo}:/Users/kane/git/pilipa/config-repo
environment: environment:
- JAVA_OPTIONS=-server -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/pilipa/ -Duser.timezone=Asia/Hong_Kong - JAVA_OPTIONS=-server -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/pilipa/ -Duser.timezone=Asia/Hong_Kong
- spring.rabbitmq.addresses=rabbit:5672 - spring.rabbitmq.addresses=rabbit:5672
...@@ -42,7 +42,7 @@ services: ...@@ -42,7 +42,7 @@ services:
volumes: volumes:
- redis_data:/data - redis_data:/data
rabbit: rabbit:
image: pilipa/rabbitmq:3.6.10-management-alpine build: ./rabbitmq
hostname: rabbit hostname: rabbit
ports: ports:
- "5672:5672" - "5672:5672"
......
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