-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
42 lines (41 loc) · 1.35 KB
/
docker-compose.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
version: "3.2"
services:
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- 5552:5552
- 5672:5672
- 15672:15672
volumes:
- ./.docker/rabbitmq/data/:/var/lib/rabbitmq/
networks:
- default
environment:
RABBITMQ_NODENAME: rabbit@rabbitmq
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_stream advertised_host localhost"
entrypoint: bash -c
command: |
'set -ex
cat > /etc/rabbitmq/rabbitmq.conf <<EOF
default_vhost = livepeer
loopback_users = none
EOF
rabbitmq-plugins enable --offline rabbitmq_stream
rabbitmq-plugins enable --offline rabbitmq_stream_management
bash <<EOF &
until rabbitmqadmin --vhost=livepeer declare exchange name=lp_golivepeer_metadata type=topic && \
rabbitmqadmin --vhost=livepeer declare exchange name=webhook_default_exchange type=topic && \
rabbitmqadmin --vhost=livepeer declare exchange name=lp_mist_api_connector type=topic && \
rabbitmqadmin --vhost=livepeer declare exchange name=lp_global_replication type=topic; do
sleep 1;
done
EOF
docker-entrypoint.sh rabbitmq-server'
healthcheck:
test: rabbitmq-diagnostics check_running
start_period: 5s
interval: 10s
networks:
default:
driver: bridge