-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
183 lines (167 loc) · 5.52 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
version: '2'
volumes:
redis:
postgres:
stack-blob:
stack-data:
node-red-data:
grafana-data:
influxdb-data:
influxdb-etc:
services:
# ------------------------------------------------------------------------------------
# The Things Stack Open Source Edition
# ------------------------------------------------------------------------------------
postgres:
image: postgres:14.3-alpine3.15
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_USER=root
- POSTGRES_DB=ttn_lorawan
volumes:
- 'postgres:/var/lib/postgresql/data'
ports:
- "127.0.0.1:5432:5432"
redis:
image: redis:7.0.0-alpine3.15
container_name: redis
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- 'redis:/data'
ports:
- "127.0.0.1:6379:6379"
stack:
image: xoseperez/the-things-stack:latest
container_name: stack
restart: unless-stopped
depends_on:
- redis
- postgres
volumes:
- 'stack-blob:/srv/ttn-lorawan/public/blob'
- 'stack-data:/srv/data'
environment:
TTS_DOMAIN: lns.example.com # set this to the IP or domain name of the host you will be using to access the stack
TTN_LW_BLOB_LOCAL_DIRECTORY: /srv/ttn-lorawan/public/blob
TTN_LW_REDIS_ADDRESS: redis:6379
TTN_LW_IS_DATABASE_URI: postgres://root:root@postgres:5432/ttn_lorawan?sslmode=disable
CLI_AUTO_LOGIN: "false"
labels:
io.balena.features.balena-api: '1'
ports:
- "80:1885"
- "443:8885"
- "1881:1881"
- "1882:1882"
- "1883:1883"
- "1884:1884"
- "1885:1885"
- "1887:1887"
- "8881:8881"
- "8882:8882"
- "8883:8883"
- "8884:8884"
- "8885:8885"
- "8887:8887"
- "1700:1700/udp"
# ------------------------------------------------------------------------------------
# LoRa Basics™ Station Packet Forwarder
# ------------------------------------------------------------------------------------
#basicstation:
# image: xoseperez/basicstation:latest
# container_name: basicstation
# restart: unless-stopped
# privileged: true
# network_mode: host
# labels:
# io.balena.features.kernel-modules: '1'
# io.balena.features.firmware: '1'
# io.balena.features.dbus: '1'
# io.balena.features.supervisor-api: '1'
# io.balena.features.balena-api: '1'
# ------------------------------------------------------------------------------------
# Semtech Legacy UDP Packet Forwarder
# Alternative to the Basics™ Station Packet Forwarder, do not use both at the same time.
# This one is NOT recommended but still widely used and supported and valid for standalone solutions.
# ------------------------------------------------------------------------------------
udp-packet-forwarder:
image: rakwireless/udp-packet-forwarder:latest
container_name: udp-packet-forwarder
restart: unless-stopped
privileged: true
network_mode: host
environment:
SERVER_HOST: localhost
SERVER_PORT: 1700
labels:
io.balena.features.kernel-modules: '1'
io.balena.features.firmware: '1'
io.balena.features.dbus: '1'
io.balena.features.supervisor-api: '1'
io.balena.features.balena-api: '1'
# ------------------------------------------------------------------------------------
# BalenaLabs WiFi-Connect
# ------------------------------------------------------------------------------------
wifi-connect:
image: balenablocks/wifi-connect:rpi
container_name: wifi-connect
network_mode: "host"
labels:
io.balena.features.dbus: '1'
io.balena.features.firmware: '1'
cap_add:
- NET_ADMIN
environment:
DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket"
# ------------------------------------------------------------------------------------
# Node-RED
# ------------------------------------------------------------------------------------
node-red:
image: bh.cr/balenalabs/balena-node-red
container_name: node-red
privileged: true
restart: unless-stopped
volumes:
- 'node-red-data:/data'
labels:
io.balena.features.dbus: '1'
io.balena.features.sysfs: '1'
io.balena.features.supervisor-api: '1'
io.balena.features.balena-api: '1'
ports:
- 1880:1880
environment:
PORT: 1880
USERNAME: "balena"
PASSWORD: "balena"
ENCRIPTION_KEY: "balena"
cap_add:
- SYS_RAWIO
devices:
- "/dev/mem:/dev/mem"
- "/dev/gpiomem:/dev/gpiomem"
- "/dev/i2c-1:/dev/i2c-1"
# ------------------------------------------------------------------------------------
# Influxdb
# ------------------------------------------------------------------------------------
influxdb:
image: influxdb:1.7.11
container_name: influxdb
restart: unless-stopped
volumes:
- influxdb-data:/var/lib/influxdb
- influxdb-etc:/etc/influxdb
# ------------------------------------------------------------------------------------
# Grafana
# ------------------------------------------------------------------------------------
grafana:
image: balenablocks/dashboard
container_name: grafana
restart: unless-stopped
ports:
- 3000:80
volumes:
- "grafana-data:/data"