-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
188 lines (177 loc) · 5.62 KB
/
docker-compose.yml
File metadata and controls
188 lines (177 loc) · 5.62 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
version: "3.9"
services:
wazigate-system:
container_name: waziup.wazigate-system
image: waziup/wazigate-system:$WAZIGATE_TAG
build:
context: ./wazigate-system
x-bake:
platforms: "linux/arm/v7"
volumes:
- ./apps/waziup.wazigate-system:/var/lib/waziapp
- /var/run:/var/run
- /sys/class/gpio:/sys/class/gpio
- /dev/mem:/dev/mem
- /var/run/wazigate-host.sock:/var/run/wazigate-host.sock
- /etc/NetworkManager:/etc/NetworkManager
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
- /sys/class/net:/sys/class/net:ro
- /etc/openvpn:/etc/openvpn
- /root/.cert/nm-openvpn:/root/.cert/nm-openvpn
- /run/NetworkManager:/run/NetworkManager
privileged: true
healthcheck:
test: curl --fail --unix-socket /var/lib/waziapp/proxy.sock http://localhost/ || exit 1
interval: 10s
timeout: 5s
retries: 30 # Will try for 5 minutes
restart: unless-stopped
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
wazigate-lora:
container_name: waziup.wazigate-lora
image: waziup/wazigate-lora:$WAZIGATE_TAG
build:
context: ./wazigate-lora
x-bake:
platforms: "linux/arm64"
labels:
- io.waziup.waziapp=waziup.wazigate-lora
volumes:
- ./apps/waziup.wazigate-lora:/var/lib/waziapp
restart: unless-stopped
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
wazigate-lora-forwarders:
container_name: waziup.wazigate-lora.forwarders
image: waziup/wazigate-lora-forwarders:$WAZIGATE_TAG
build:
context: ./wazigate-lora/forwarders
x-bake:
platforms: "linux/arm64"
tty: true
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
- ./apps/waziup.wazigate-lora/forwarders/:/root/conf
- /var/run/dbus:/var/run/dbus
- /sys/class/gpio:/sys/class/gpio
- /dev:/dev
environment:
- ENABLE_MULTI_SPI=1
- ENABLE_MULTI_USB=1
- ENABLE_SINGLE_SPI=1
devices:
- /dev/ttyACM0:/dev/ttyACM0
labels:
- io.waziup.waziapp=waziup.wazigate-lora
privileged: true
restart: unless-stopped
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
chirpstack:
container_name: waziup.wazigate-lora.chirpstack-v4
image: chirpstack/chirpstack:4.6
platform: linux/arm64
command: -c /etc/chirpstack
restart: unless-stopped
volumes:
- ./apps/waziup.wazigate-lora/chirpstack:/etc/chirpstack
- /var/run/redis:/var/run/redis
depends_on:
- postgres
- mosquitto
environment:
- MQTT_BROKER_HOST=mosquitto
- POSTGRESQL_HOST=postgres
ports:
- 8080:8080
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
labels:
io.waziup.wazigate.dep: "wazigate-lora"
chirpstack-gateway-bridge:
container_name: waziup.wazigate-lora.chirpstack-gateway-bridge
image: chirpstack/chirpstack-gateway-bridge:4
platform: linux/arm64
volumes:
- ./apps/waziup.wazigate-lora/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
environment:
- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}
- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}
- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/command/#
depends_on:
- mosquitto
ports:
- 1700:1700/udp
restart: unless-stopped
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
labels:
- io.waziup.waziapp=waziup.wazigate-lora
chirpstack-rest-api:
container_name: chirpstack-rest-api
image: chirpstack/chirpstack-rest-api:4.6
platform: linux/arm64
restart: unless-stopped
command: --server chirpstack:8080 --bind 0.0.0.0:8090 --insecure
ports:
- 8090:8090
depends_on:
- chirpstack
postgres:
container_name: postgres
image: postgres:14-alpine
platform: linux/arm64
volumes:
- ./apps/waziup.wazigate-lora/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_PASSWORD=root
healthcheck:
test: ["CMD", "pg_isready", "-U", "chirpstack"]
interval: 10s
timeout: 5s
retries: 5
command: postgres -c autovacuum=off
restart: unless-stopped
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto:1.6 # The MQTT bridge seems to work only with eclipse-mosquitto 1.6
#image: eclipse-mosquitto:2
platform: linux/arm64/v8
restart: unless-stopped
ports:
- 1884:1884 # Using port 1884 because WaziGate Edge MQTT uses port 1883
- 1885:1885
volumes:
- ./apps/waziup.wazigate-lora/mosquitto/config/:/mosquitto/config/
entrypoint: ["sh", "-c", "./mosquitto/config/wait-for-wazigate-edge.sh waziup.wazigate-edge:1883 -- mosquitto -c /mosquitto/config/mosquitto.conf"]
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
#-------------------------#
networks:
default:
name: wazigate
volumes:
postgresqldata:
name: postgresqldata