-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (79 loc) · 1.94 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
version: '3'
services:
mysql:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: iacf12345678
volumes:
- mysql-data:/var/lib/mysql
- ../iac-mysql/iac.sql:/docker-entrypoint-initdb.d/dump.sql
- ../iac-mysql/create-user.sql:/docker-entrypoint-initdb.d/init.sql
#command:
# - init-file=/docker-entrypoint-initdb.d/create-user.sql
# - init-file=/docker-entrypoint-initdb.d/initmysql.sql
# - mysql -u root -p"$${MYSQL_ROOT_PASSWORD}" iac < /docker-entrypoint-initdb.d/dump.sql
ports:
- "3306:3306"
networks:
- backend
mongodb:
image: mongo:latest
volumes:
- mongodb-data:/data/db
- ../dump/iac_cfg.zip:/docker-entrypoint-initdb.d/
#command: mongorestore --host localhost --port 27017 /docker-entrypoint-initdb.d/iac_cfg.zip
#mongod --bind_ip_all --replSet rs0
# echo "Restoring MongoDB dump..."
# mongorestore /db:IAC_CFG /uri:mongodb://localhost:27017 /docker-entrypoint-initdb.d/dump
ports:
- "27017:27017"
networks:
- backend
app-server:
build:
context: ../iac
dockerfile: Dockerfile
depends_on:
- mysql
- mongodb
ports:
- "8080:8080"
networks:
- backend
web-server:
build:
context: ../iac-ui
dockerfile: Dockerfile
depends_on:
- app-server
ports:
- "8000:8000"
networks:
- backend
- frontend
signalr-server:
build:
context: ../iac-signalr
dockerfile: Dockerfile
ports:
- "8222:8222"
networks:
- backend
- frontend
mqtt-client:
build:
context: ../iac-mqtt
dockerfile: Dockerfile
depends_on:
- mysql
- mongodb
- app-server
networks:
- backend
volumes:
mysql-data:
mongodb-data:
networks:
backend:
frontend:
driver: bridge