-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
187 lines (175 loc) · 5.06 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
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
version: "3"
services:
wazigate-lora:
container_name: waziup.wazigate-lora
image: waziup/wazigate-lora
build:
context: ./
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: always
#environment:
# - WAZIGATE_EDGE=wazigate-edge:80
depends_on:
- chirpstack
- chirpstack-gateway-bridge
- chirpstack-rest-api
volumes:
- .:/root/app
- ./main-app:/go/src/main-app # Needed for development
- /var/run/dbus:/var/run/dbus
- /sys/class/gpio:/sys/class/gpio
- /dev:/dev
#added for development! Comment for production
# - /var/lib/wazigate/apps/waziup.wazigate-lora:/var/lib/waziapp
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
command: -c /etc/chirpstack
restart: unless-stopped
volumes:
- ./conf/chirpstack:/etc/chirpstack
#- ./lorawan-devices:/opt/lorawan-devices
#added for development! Comment for production
#- /var/run/redis:/var/run/redis
depends_on:
- postgres
- mosquitto
- redis
environment:
- MQTT_BROKER_HOST=mosquitto
- REDIS_HOST=redis
- 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
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: unless-stopped
ports:
- 1700:1700/udp
volumes:
- ./conf/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
labels:
io.waziup.wazigate.dep: "wazigate-lora"
extra_hosts:
- "wazigate:172.17.0.1"
- "waziup.wazigate-edge:172.17.0.1"
- "wazigate-edge:172.17.0.1"
chirpstack-rest-api:
container_name: chirpstack-rest-api
image: chirpstack/chirpstack-rest-api:4
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
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: unless-stopped
volumes:
- ./conf/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=root
labels:
io.waziup.wazigate.dep: "wazigate-lora"
redis:
container_name: redis
image: redis:7-alpine
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: unless-stopped
volumes:
- redisdata:/data
labels:
io.waziup.wazigate.dep: "wazigate-lora"
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
restart: unless-stopped
ports:
- 1884:1884 # Using port 1884 because WaziGate Edge MQTT uses port 1883
- 1885:1885
volumes:
- ./conf/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"
labels:
io.waziup.wazigate.dep: "wazigate-lora"
forwarders:
container_name: waziup.wazigate-lora.forwarders
image: waziup/wazigate-lora-forwarders
build:
context: ./forwarders
# dockerfile: Dockerfile-dev
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: always
environment:
- ENABLE_MULTI_SPI=1
- ENABLE_MULTI_USB=1
- ENABLE_SINGLE_SPI=1
volumes:
- ./forwarders/conf/:/root/conf
- /var/run/dbus:/var/run/dbus
- /sys/class/gpio:/sys/class/gpio
- /dev:/dev
devices:
- /dev/ttyACM0
privileged: true
tty: true
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"
volumes:
postgresqldata:
redisdata:
networks:
default:
external:
name: wazigate