forked from bojanzdelar/Learning-management-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
182 lines (169 loc) · 3.94 KB
/
docker-compose.prod.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
version: '3'
services:
database-auth:
image: mysql:8.0.30-debian
ports:
- 3307:3306
healthcheck:
test: mysqladmin ping -h localhost
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
volumes:
- auth-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: lms-auth
database-faculty:
image: mysql:8.0.30-debian
ports:
- 3308:3306
healthcheck:
test: mysqladmin ping -h localhost
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
volumes:
- faculty-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: lms-faculty
database-subject:
image: mysql:8.0.30-debian
ports:
- 3309:3306
healthcheck:
test: mysqladmin ping -h localhost
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
volumes:
- subject-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: lms-subject
database-exam:
image: mysql:8.0.30-debian
ports:
- 3310:3306
volumes:
- exam-data:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h localhost
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: lms-exam
backend-config-server:
build:
context: ./backend/config-server
dockerfile: Dockerfile
ports:
- 8888:8888
healthcheck:
test: wget --spider --quiet 'http://localhost:8888/actuator/health/' || exit 1
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
environment:
SPRING_PROFILES_ACTIVE: prod, native
backend-discovery-server:
build:
context: ./backend/discovery-server
dockerfile: Dockerfile
ports:
- 8761:8761
healthcheck:
test: wget --spider --quiet 'http://localhost:8761/actuator/health/' || exit 1
interval: 25s
retries: 5
start_period: 20s
timeout: 10s
depends_on:
backend-config-server:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: prod
backend-api-gateway:
build:
context: ./backend/api-gateway
dockerfile: Dockerfile
ports:
- 8080:8080
depends_on:
backend-discovery-server:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: prod
backend-auth-service:
build:
context: ./backend/auth-service
dockerfile: Dockerfile
ports:
- 8081:8081
depends_on:
backend-discovery-server:
condition: service_healthy
database-auth:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: prod
backend-faculty-service:
build:
context: ./backend/faculty-service
dockerfile: Dockerfile
ports:
- 8082:8082
depends_on:
backend-discovery-server:
condition: service_healthy
database-faculty:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: prod
backend-subject-service:
build:
context: ./backend/subject-service
dockerfile: Dockerfile
ports:
- 8083:8083
depends_on:
backend-discovery-server:
condition: service_healthy
database-subject:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: prod
backend-exam-service:
build:
context: ./backend/exam-service
dockerfile: Dockerfile
ports:
- 8084:8084
depends_on:
backend-discovery-server:
condition: service_healthy
database-exam:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: prod
frontend-app:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 80:80
environment:
PRODUCTION: true
volumes:
auth-data:
faculty-data:
subject-data:
exam-data: