-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
202 lines (178 loc) · 3.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
version: '3'
services:
gateway:
restart: always
build:
context: ./API_Gateway
dockerfile: Dockerfile
ports:
- '3000:3000'
depends_on:
- userDB
- courseDB
- paymentDB
- certificateDB
- companyDB
- planDB
networks:
- red-local
#description: Gateway API service para direccionar las solicitudes a la API correspondiente
user:
restart: always
build:
context: ./API_User
dockerfile: Dockerfile
ports:
- '3001:3001'
depends_on:
- userDB
networks:
- red-local
#description: User API service
userDB:
image: mongo
ports:
- '27020:27017'
volumes:
# - user-db-data:/data/db
- ./Data/User:/data/db
networks:
- red-local
#description: Base de datos para User API service
course:
restart: always
build:
context: ./API_Course
dockerfile: Dockerfile
ports:
- '3002:3002'
depends_on:
- courseDB
networks:
- red-local
#description: Course API service
courseDB:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=contraseña
- MYSQL_DATABASE=Courses
ports:
- '3307:3306'
volumes:
- ./Scripts_DBS/initCourse.sql:/docker-entrypoint-initdb.d/initCourse.sql
#- course-db-data:/var/lib/mysql
- ./Data/Course:/var/lib/mysql
networks:
- red-local
#description: Base de datos para Course API service
payment:
restart: always
build:
context: ./API_Payment
dockerfile: Dockerfile
ports:
- '3003:3003'
depends_on:
- paymentDB
networks:
- red-local
#description: Payment API service
paymentDB:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=contraseña
- MYSQL_DATABASE=Payments
ports:
- '3306:3306'
volumes:
- ./Scripts_DBS/initPayment.sql:/docker-entrypoint-initdb.d/initPayment.sql
#- payment-db-data:/var/lib/mysql
- ./Data/Payment:/var/lib/mysql
networks:
- red-local
#description: Base de datos para Payment API service
certificate:
restart: always
build:
context: ./API_Certificate
dockerfile: Dockerfile
ports:
- '3004:3004'
depends_on:
- certificateDB
networks:
- red-local
#description: Certificate API service
certificateDB:
image: mongo
ports:
- '27022:27017'
volumes:
#- certificate-db-data:/data/db
- ./Data/Certificate:/data/db
networks:
- red-local
#description: Base de datos para Certificate API service
company:
restart: always
build:
context: ./API_Company
dockerfile: Dockerfile
ports:
- '3005:3005'
depends_on:
- companyDB
networks:
- red-local
#description: Company API service
companyDB:
image: mongo
ports:
- '27021:27017'
volumes:
# - company-db-data:/data/db
- ./Data/Company:/data/db
networks:
- red-local
#description: Base de datos para Company API service
plan:
restart: always
build:
context: ./API_Plan
dockerfile: Dockerfile
ports:
- '3006:3006'
depends_on:
- planDB
networks:
- red-local
#description: Plan API service
planDB:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=contraseña
- MYSQL_DATABASE=Plans
ports:
- '3308:3306'
volumes:
- ./Scripts_DBS/initPlan.sql:/docker-entrypoint-initdb.d/initPlan.sql
# - plan-db-data:/var/lib/mysql
- ./Data/Plan:/var/lib/mysql
networks:
- red-local
#description: Base de datos para Plan API service
networks:
red-local:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.25.0.0/16
gateway: 172.25.0.1
volumes:
user-db-data:
course-db-data:
payment-db-data:
plan-db-data:
company-db-data:
certificate-db-data: