forked from IoTKETI/Mobius_Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (46 loc) · 1.21 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
version: '2.1'
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: "root"
MYSQL_ROOT_PASSWORD: "dksdlfduq2"
MYSQL_DATABASE: "mobiusdb"
ports:
- "3306:3306"
network_mode: "host"
volumes:
- ./Mobius/mobius/mobiusdb.sql:/docker-entrypoint-initdb.d/mobiusdb.sql
healthcheck:
test: ["CMD", "mysqladmin" ,"--password=dksdlfduq2","ping"]
interval: 20s
timeout: 20s
retries: 5
node:
image: "node:14.15.2"
working_dir: /home/node/app
environment:
- NODE_ENV=production
volumes:
- ./Mobius:/home/node/app
network_mode: "host"
expose:
- "8081"
command: "node mobius"
depends_on:
db:
condition: service_healthy
mqtt:
image: eclipse-mosquitto:latest
ports:
- 1883:1883
network_mode: "host"
volumes:
- ./etc/mosquitto:/etc/mosquitto:ro
- ./var/log/mosquitto:/var/log/mosquitto:rw
depends_on:
db:
condition: service_healthy