forked from CSID-DGU/2019-1-CECD3-Binary-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (84 loc) · 1.93 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
version: '2.1'
services:
backend_mysql:
container_name: backend_mysql
image: mysql:5.7
environment:
MYSQL_HOST: "localhost"
MYSQL_DATABASE: "mobiusdb"
MYSQL_ROOT_PASSWORD: "secret"
ports:
- "3306:3306"
volumes:
- ./Backend/sql:/docker-entrypoint-initdb.d
healthcheck:
test: "/usr/bin/mysql --user=root --password=secret --execute \"SHOW DATABASES;\""
timeout: 20s
retries: 10
backend_mobius:
container_name: backend_mobius
image: "node:latest"
working_dir: /usr/src/app
environment:
- NODE_ENV=production
volumes:
- ./Backend:/usr/src/app
ports:
- "8080:8080"
command: "node mobius"
depends_on:
backend_mysql:
condition: service_healthy
env_file:
- .env
backend_mqtt:
container_name: backend_mqtt
image: eclipse-mosquitto:latest
ports:
- "1883:1883"
- "9001:9001"
network_mode: "host"
volumes:
- ./Backend/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- ./docker/etc/mosquitto:/etc/mosquitto:ro
- ./docker/var/log/mosquitto:/var/log/mosquitto:rw
depends_on:
backend_mysql:
condition: service_healthy
backend_mongo:
container_name: backend_mongo
image: mongo
volumes:
- mongodata:/data/db
ports:
- "27017:27017"
depends_on:
- backend_mobius
backend_app:
container_name: backend_app
image: "node:latest"
working_dir: /usr/src/app
volumes:
- ./Backend/App:/usr/src/app
ports:
- "8081:8081"
command: "yarn start"
depends_on:
- backend_mongo
env_file:
- .env
frontend_app:
container_name: frontend_app
image: "node:latest"
working_dir: /usr/src/app
volumes:
- ./Frontend:/usr/src/app
ports:
- "3000:3000"
command: "yarn start"
depends_on:
- backend_app
env_file:
- .env
volumes:
mongodata: