-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.rabbitmq.yml
65 lines (59 loc) · 1.94 KB
/
docker-compose.rabbitmq.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# docker-compose -f docker-compose.rabbitmq.yml up --build -d
# https://hub.docker.com/r/bitnami/rabbitmq
version: "3.4"
networks:
app-tier:
driver: bridge
services:
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
volumes:
- ./.docker/rabbitmq/etc/:/etc/rabbitmq/
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
- ./.docker/rabbitmq/logs/:/var/log/rabbitmq/
environment:
- RABBITMQ_ERLANG_COOKIE=s3cr3tc00ki3
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
# RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERL_COOKIE}
# ...
#env_file:
#- .env
ports:
- 5672:5672
- 15672:15672
networks:
- app-tier
sample-rabbitmq-producer:
build:
context: .
dockerfile: ./src/Samples/Sample.RabbitMQ.Producer/Dockerfile
container_name: "Sample.RabbitMQ.Producer"
volumes:
- ./.docker/rabbitmq/Sample.RabbitMQ.Producer/Logs/:/app/Logs/
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_SUBSCRIPTION_CLIENTNAME=testqueue
#env_file:
# - .env
networks:
- app-tier
sample-rabbitmq-consumer:
build:
context: .
dockerfile: ./src/Samples/Sample.RabbitMQ.Consumer/Dockerfile
container_name: "Sample.RabbitMQ.Consumer"
volumes:
- ./.docker/rabbitmq/Sample.RabbitMQ.Consumer/Logs/:/app/Logs/
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
- RABBITMQ_HOSTNAME=rabbitmq
- RABBITMQ_SUBSCRIPTION_CLIENTNAME=testqueue
#env_file:
# - .env
networks:
- app-tier