Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
I
infrastructure-dev
Project
Project
Details
Activity
Releases
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
4ea1720e
Commit
4ea1720e
authored
Sep 06, 2017
by
朱孟欣(已离职)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update stack ymal and doc.
parent
158a092f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
23 deletions
+29
-23
README.md
README.md
+10
-6
dev.env
dev.env
+0
-4
docker-stack.yml
docker-stack.yml
+7
-13
Dockerfile
rabbitmq/Dockerfile
+11
-0
build.sh
rabbitmq/build.sh
+1
-0
No files found.
README.md
View file @
4ea1720e
...
...
@@ -5,17 +5,21 @@ Below services will be ran by this tool,
-
Mongo DB 3.2.9
-
Redis 3.2
-
RabbitMQ 3.6
-
RabbitMQ 3.6
with
`stomp`
and
`shovel`
plugins
###Prerequisites
1.
Install
`Docker`
17.
3
+
1.
Install
`Docker`
17.
06
+
2.
Enable Swarm mode of Docker
###How to set up my development
1.
Update the ports of local service in
`dev.env`
if necessary
2.
Run below command in shell,
1.
Build custom rabbitmq image,
```
shell
docker stack deploy
-c
docker-compose.yml mydev
cd
rabbitmq
./build.sh
```
1.
Run below command in shell,
```
shell
docker stack deploy
-c
docker-stack.yml mydev
```
###Note
...
...
@@ -25,7 +29,7 @@ If you want to persistly save your data, you can create named volume like below,
```
shell
docker volume create
--opt
type
=
none
--opt
device
=
<absolute path of host>
--opt
o
=
bind
--name
mongo_data
```
Update
`docker-
compose
.yml`
as below,
Update
`docker-
stack
.yml`
as below,
```
shell
volumes:
redis_data:
...
...
dev.env
deleted
100644 → 0
View file @
158a092f
MONGO_PORT=27017
REDIS_PORT=6379
RABBITMQ_PORT=5672
RABBITMQMG_PORT=15672
\ No newline at end of file
docker-
compose
.yml
→
docker-
stack
.yml
View file @
4ea1720e
version
:
"
3"
version
:
"
3
.3
"
services
:
mongo
:
image
:
mongo:3.2.9
ports
:
-
"
${MONGO_PORT}
:27017"
-
"
27017
:27017"
networks
:
-
pilipa-dev
env_file
:
-
./dev.env
volumes
:
-
mongo_data:/data/db
redis
:
...
...
@@ -15,21 +13,18 @@ services:
networks
:
-
pilipa-dev
ports
:
-
"
${REDIS_PORT}:6379"
env_file
:
-
./dev.env
-
"
6379:6379"
volumes
:
-
redis_data:/data
rabbit
:
image
:
rabbitmq:3.6
-management-alpine
image
:
pilipa/rabbitmq:3.6.10
-management-alpine
hostname
:
rabbit
ports
:
-
"
${RABBITMQ_PORT}:5672"
-
"
${RABBITMQMG_PORT}:15672"
-
"
5672:5672"
-
"
15672:15672"
-
"
61613:61613"
networks
:
-
pilipa-dev
env_file
:
-
./dev.env
environment
:
-
RABBITMQ_DEFAULT_VHOST=pilipa
...
...
@@ -40,4 +35,3 @@ networks:
volumes
:
redis_data
:
mongo_data
:
# external: true
rabbitmq/Dockerfile
0 → 100644
View file @
4ea1720e
FROM
rabbitmq:3.6.10-management-alpine
ENV
TZ=Asia/Shanghai
RUN
echo
"http://mirrors.aliyun.com/alpine/v3.5/main"
>
/etc/apk/repositories
\
&& echo "http://mirrors.aliyun.com/alpine/v3.5/community" >>/etc/apk/repositories \
&& apk add --no-cache --update su-exec \
&& rm -rf /var/cache/apk/* \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone
RUN
rabbitmq-plugins
enable
--offline
rabbitmq_shovel rabbitmq_shovel_management rabbitmq_web_stomp
rabbitmq/build.sh
0 → 100755
View file @
4ea1720e
docker build
-t
pilipa/rabbitmq:3.6.10-management-alpine .
\ No newline at end of file
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