Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (122 loc) · 3.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
129 lines (122 loc) · 3.76 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
mosquitto:
image: eclipse-mosquitto:2
container_name: shellbee-mosquitto
ports:
- "1883:1883"
volumes:
- ./docker/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
- mosquitto-data:/mosquitto/data
healthcheck:
test: ["CMD", "mosquitto_pub", "-h", "localhost", "-t", "healthcheck", "-m", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
z2m-bridge:
build: ./docker/z2m-ws-bridge
container_name: shellbee-z2m
depends_on:
mosquitto:
condition: service_healthy
ports:
- "8080:8080"
environment:
- MQTT_HOST=mosquitto
- MQTT_PORT=1883
- Z2M_TOPIC=zigbee2mqtt
- WS_PORT=8080
- HEALTH_PORT=8081
- AUTH_TOKEN=shellbee-integration-token
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8081', timeout=2)"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
restart: unless-stopped
seeder:
build: ./docker/seeder
container_name: shellbee-seeder
depends_on:
mosquitto:
condition: service_healthy
z2m-bridge:
condition: service_healthy
ports:
- "8765:8765" # HTTP test center (UI + scenario API)
environment:
- MQTT_HOST=mosquitto
- MQTT_PORT=1883
- Z2M_TOPIC=zigbee2mqtt
- MODE=continuous
- SEED_INTERVAL=10
- CONTROL_PORT=8765
restart: unless-stopped
# ── Second mock bridge (multi-bridge testing) ─────────────────────────────
# Brings up a fully isolated second stack — distinct broker, distinct z2m
# bridge, distinct seeder + control plane — so the iOS app can connect to
# `localhost:8080` and `localhost:8082` simultaneously to exercise multi-
# bridge flows. The seeder's FIXTURE_PREFIX gives every device a "Lab "
# prefix and salts IEEEs so the two bridges look genuinely different.
# Bring up just the primary stack with `docker compose up mosquitto z2m-bridge seeder`
# if you don't need the second bridge.
mosquitto-2:
image: eclipse-mosquitto:2
container_name: shellbee-mosquitto-2
ports:
- "1884:1883"
volumes:
- ./docker/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
- mosquitto-2-data:/mosquitto/data
healthcheck:
test: ["CMD", "mosquitto_pub", "-h", "localhost", "-t", "healthcheck", "-m", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
z2m-bridge-2:
build: ./docker/z2m-ws-bridge
container_name: shellbee-z2m-2
depends_on:
mosquitto-2:
condition: service_healthy
ports:
- "8082:8080"
environment:
- MQTT_HOST=mosquitto-2
- MQTT_PORT=1883
- Z2M_TOPIC=zigbee2mqtt
- WS_PORT=8080
- HEALTH_PORT=8081
- AUTH_TOKEN=shellbee-integration-token-2
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8081', timeout=2)"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
restart: unless-stopped
seeder-2:
build: ./docker/seeder
container_name: shellbee-seeder-2
depends_on:
mosquitto-2:
condition: service_healthy
z2m-bridge-2:
condition: service_healthy
ports:
- "8766:8765" # HTTP test center for the second bridge
environment:
- MQTT_HOST=mosquitto-2
- MQTT_PORT=1883
- Z2M_TOPIC=zigbee2mqtt
- MODE=continuous
- SEED_INTERVAL=10
- CONTROL_PORT=8765
- FIXTURE_PREFIX=${SECONDARY_FIXTURE_PREFIX-Lab}
- FIXTURE_IEEE_SALT=Lab
restart: unless-stopped
volumes:
mosquitto-data:
mosquitto-2-data: