-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (47 loc) · 1007 Bytes
/
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
version: '3'
services:
app:
build: ./backEnd
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/iot?useSSL=false
- MQTT_BROKER_URL=tcp://mqtt:1883
ports:
- "8080:8080"
restart: always
depends_on:
- db
- mqtt
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=123456
ports:
- "3306:3306"
volumes:
- ./backEnd/src/main/resources/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- db-data:/var/lib/mysql
mqtt:
image: eclipse-mosquitto
ports:
- "1883:1883"
volumes:
- ./backEnd/src/main/resources/mosquitto.conf:/mosquitto/config/mosquitto.conf
client:
build: ./iotclient
environment:
- SERVER=tcp://mqtt:1883
restart: always
depends_on:
- mqtt
sim:
build: ./iotsimulator
ports:
- "5000:5000"
environment:
- MQTT_BROKER=mqtt
- MQTT_PORT=1883
restart: always
depends_on:
- mqtt
volumes:
db-data: