Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
51 lines (51 loc) · 1.66 KB
/
Copy pathcompose.yaml
File metadata and controls
51 lines (51 loc) · 1.66 KB
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
services:
amqp:
image: rabbitmq:4.1.8-alpine@sha256:1a087dd3a29b91448407409df70f4f6cb213ac0c269a62861bfe2a665f4ced03
ports:
- "127.0.0.1:${AMQP_TEST_PORT:-15672}:5672"
volumes:
- ./brokers/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./brokers/rabbitmq-definitions.json:/etc/rabbitmq/definitions.json:ro
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "check_port_connectivity"]
interval: 2s
timeout: 5s
retries: 30
mqtt:
image: eclipse-mosquitto:2.0.22@sha256:212f89e1eaeb2c322d6441b64396e3346026674db8fa9c27beac293405c32b3c
ports:
- "127.0.0.1:${MQTT_TEST_PORT:-13883}:1883"
volumes:
- ./brokers/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- ./brokers/mosquitto.acl:/mosquitto/config/mosquitto.acl:ro
entrypoint: ["/bin/sh", "-ec"]
command:
- |
mosquitto_passwd -b -c /tmp/passwords server-alice test-server-alice-password
mosquitto_passwd -b /tmp/passwords server-bob test-server-bob-password
mosquitto_passwd -b /tmp/passwords health test-health-password
mosquitto_passwd -b /tmp/passwords alice test-alice-password
mosquitto_passwd -b /tmp/passwords bob test-bob-password
chmod 644 /tmp/passwords
exec mosquitto -c /mosquitto/config/mosquitto.conf
healthcheck:
test:
[
"CMD",
"mosquitto_pub",
"-h",
"127.0.0.1",
"-u",
"health",
"-P",
"test-health-password",
"-t",
"health",
"-m",
"",
"-q",
"2",
]
interval: 1s
timeout: 3s
retries: 20