-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (50 loc) · 1.1 KB
/
docker-compose.yaml
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
services:
broker:
image: eclipse-mosquitto
working_dir: /broker
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./broker/config:/mosquitto/config:rw
- ./broker/data:/mosquitto/data:rw
- ./broker/log:/mosquitto/log:rw
restart: always
funnel:
build: ./funnel
command: sh -c "sleep 24s ; python3 -u ./funnel.py"
depends_on:
- broker
- mysql
environment:
- MQTT_USER=${MQTT_USER}
- MQTT_PASSWORD=${MQTT_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- PYTHONUNBUFFERED=1
restart: always
mysql:
image: mysql:latest
ports:
- 3306:3306
volumes:
- mysql-data:/var/lib/mysql
- ./mySql/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=idsBench
restart: always
flask:
build:
context: flask
target: builder
stop_signal: SIGINT
depends_on:
- mysql
ports:
- '8000:8000'
restart: always
volumes:
config:
data:
log:
mysql-data: