forked from OS2iot/OS2iot-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
195 lines (179 loc) · 5.9 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
188
189
190
191
192
193
194
195
version: "3.8"
services:
#Chirpstack
chirpstack-network-server:
image: chirpstack/chirpstack-network-server:3.16.8
volumes:
- ./configuration/chirpstack-network-server:/etc/chirpstack-network-server
chirpstack-application-server:
image: chirpstack/chirpstack-application-server:3.17.9
ports:
- 8084:8080
volumes:
- ./configuration/chirpstack-application-server:/etc/chirpstack-application-server
chirpstack-gateway-bridge:
image: chirpstack/chirpstack-gateway-bridge:4.0.10
ports:
- 1700:1700/udp
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
chirpstack:
image: chirpstack/chirpstack:4.6
command: -c /etc/chirpstack
volumes:
- ./configuration/chirpstack:/etc/chirpstack
ports:
- 8080:8080
postgresql:
image: postgres:9.6-alpine
environment:
- POSTGRES_PASSWORD=root
ports:
- 5434:5432
volumes:
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data
postgresChirpstackV4:
image: postgres:bookworm
volumes:
- ./configuration/postgresChirpstackV4/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresChirpstackV4/data
environment:
- POSTGRES_PASSWORD=root
ports:
- 5435:5432
redis:
image: redis:5-alpine
volumes:
- redisdata:/data
ports:
- 6379:6379
mosquitto:
image: eclipse-mosquitto:2
ports:
- 1883:1883
volumes:
- ./configuration/eclipse-mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
#OS2IoT
os2iot-frontend:
image: "os2iot-frontend"
build:
context: "../OS2IoT-frontend"
dockerfile: "Dockerfile-prod"
ports:
- "8081:8081"
environment:
PRODUCTION: "false"
BASE_URL: http://localhost:3000/api/v1/
TABLE_PAGE_SIZE: 25
#OS2IoT
os2iot-lorawanSimulator:
image: "os2iot-lorawan_simulator"
build:
context: "./simulator"
dockerfile: "Dockerfile"
ports:
- "8768:8000"
os2iot-backend:
image: "os2iot-backend"
build:
context: ../OS2IoT-backend
dockerfile: Dockerfile
target: prod
ports:
- 3000:3000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/status"]
interval: 10s
timeout: 5s
retries: 5
depends_on:
- os2iot-postgresql
environment:
DATABASE_HOSTNAME: os2iot-postgresql
DATABASE_PORT: 5432
KAFKA_HOSTNAME: os2iot-kafka
KAFKA_PORT: 9092
CS_MQTT_HOSTNAME: mosquitto
CS_MQTT_PORT: 1883
CHIRPSTACK_HOSTNAME: "chirpstack-svc" # Change this to the chirpstack hostname
CHIRPSTACK_PORT: 8080
LOG_LEVEL: debug
EMAIL_PORT: 587
EMAIL_HOST: smtp.ethereal.email # Change this for sending emails with OS2iot
EMAIL_USER: some-login-email@somehost.dk # Change this for sending emails with OS2iot
EMAIL_PASS: some-login-pass # Change this for sending emails with OS2iot
EMAIL_FROM: some-from-email@somehost.dk # Change this for sending emails with OS2iot
MQTT_BROKER_HOSTNAME: # Change this to the public ip/hostname of the mqtt broker
ENCRYPTION_SYMMETRIC_KEY: # Change this to the symmetric key generated
CA_KEY_PASSWORD: # Change this to the password of the generated CA certificate key
MQTT_SUPER_USER_PASSWORD: # Change this to the password for the internal super user.
CHIRPSTACK_API_KEY: # Change this to the API_KEY created in chirpstack.
volumes:
- ./configuration/mosquitto-broker-os2iot/ca.crt:/tmp/os2iot/backend/dist/resources/ca.crt
- ./configuration/mosquitto-broker-os2iot/ca.key:/tmp/os2iot/backend/dist/resources/ca.key
- ./configuration/mosquitto-broker-os2iot/ca.crt:/tmp/os2iot/backend/resources/ca.crt
- ./configuration/mosquitto-broker-os2iot/ca.key:/tmp/os2iot/backend/resources/ca.key
os2iot-postgresql:
restart: always
image: postgis/postgis # We need postgis to store geodata
ports:
- 5433:5432
hostname: os2iot-pg
healthcheck:
test: ["CMD-SHELL", "pg_isready -U os2iot"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: os2iot
POSTGRES_USER: os2iot
POSTGRES_PASSWORD: toi2so
volumes:
- ./configuration/os2iot-postgresql/initdb:/docker-entrypoint-initdb.d
- pg-data:/var/lib/postgresql:Z
os2iot-zookeeper:
image: "bitnami/zookeeper:latest"
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- os2iot-zookeeperdata:/data
tmpfs: "/datalog"
os2iot-kafka:
image: "bitnami/kafka:latest"
ports:
- "9092:9092"
- "9093:9093"
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092,INTERNAL://:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://os2iot-kafka:9092,INTERNAL://127.0.0.1:9093
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT
- KAFKA_ZOOKEEPER_CONNECT=os2iot-zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
volumes:
- os2iot-kafkadata:/var/lib/kafka/data
depends_on:
- os2iot-zookeeper
mosquitto-os2iot:
image: os2iot-mosquitto
ports:
- 8884:8884
- 8885:8885
build:
context: "./mosquitto-broker"
dockerfile: "Dockerfile"
volumes:
- ./configuration/mosquitto-broker-os2iot/ca.crt:/etc/mosquitto/ca_certificates/ca.crt
- ./configuration/mosquitto-broker-os2iot/ca.key:/etc/mosquitto/ca_certificates/ca.key
- ./configuration/mosquitto-broker-os2iot/server.key:/etc/mosquitto/certs/server.key
- ./configuration/mosquitto-broker-os2iot/server.crt:/etc/mosquitto/certs/server.crt
- ./configuration/mosquitto-broker-os2iot/mosquitto-os2iot.conf:/etc/mosquitto/conf.d/go-auth.conf
volumes:
pg-data:
postgresqldata:
redisdata:
os2iot-kafkadata:
os2iot-zookeeperdata: