-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
318 lines (292 loc) · 7.99 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
version: '3.6'
# Define named volumes for persistent data
volumes:
apache-airflow_data:
driver: local
postgres_data:
driver: local
pgadmin_data:
driver: local
mongo_data:
driver: local
minio-data-1:
driver: local
minio-data-2:
driver: local
minio-data-3:
driver: local
elasticsearch-data:
driver: local
# Define a custom network for services to communicate
networks:
lyric_wave_network:
services:
# Elasticsearch is a powerful open source search and analytics engine that makes data easy to explore.
lyric_wave_elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
container_name: lyric-wave-elasticsearch
environment:
- ELASTIC_PASSWORD=ssanchez00
- "ES_JAVA_OPTS=-Xmx256m -Xms256m"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
networks:
- lyric_wave_network
lyric_wave_minio1:
image: minio/minio
container_name: lyric-wave-minio-1
env_file:
- .env
volumes:
- minio-data-1:/data
command: server http://lyric-wave-minio-{1...3}/data
networks:
- lyric_wave_network
lyric_wave_minio2:
image: minio/minio
container_name: lyric-wave-minio-2
env_file:
- .env
volumes:
- minio-data-2:/data
command: server http://lyric-wave-minio-{1...3}/data
networks:
- lyric_wave_network
lyric_wave_minio3:
image: minio/minio
container_name: lyric-wave-minio-3
env_file:
- .env
volumes:
- minio-data-3:/data
command: server http://lyric-wave-minio-{1...3}/data
networks:
- lyric_wave_network
lyric_wave_minio_haproxy:
image: haproxytech/haproxy-alpine:2.7
container_name: lyric-wave-minio-haproxy
volumes:
- ./haproxy/minio/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- '9000:9000'
- '1936:1936'
networks:
- lyric_wave_network
# MongoDB container for Apache Airflow
lyric_wave_mongo:
container_name: lyric-wave-mongo
image: mongo
env_file:
- .env
ports:
- "27017:27017"
networks:
- lyric_wave_network
# Web-based MongoDB admin interface, written with Node.js and express
lyric_wave_mongo_express:
image: mongo-express
container_name: lyric-wave-mongo-express
restart: on-failure
env_file:
- .env
depends_on:
- lyric_wave_mongo
ports:
- "8087:8081"
networks:
- lyric_wave_network
# Redis container for Apache Airflow's message broker
lyric_wave_redis:
image: redis:5.0.5
container_name: lyric-wave-redis
restart: always
networks:
- lyric_wave_network
# PostgreSQL database container for Apache Airflow
lyric_wave_postgres:
image: postgres:13
container_name: lyric-wave-postgres
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env
networks:
- lyric_wave_network
# pgAdmin container for managing the PostgreSQL database
lyric_wave_pgadmin:
image: dpage/pgadmin4
container_name: lyric-wave-pgadmin
restart: always
env_file:
- .env
ports:
- 8085:80
volumes:
- ./pgadmin_data:/var/lib/pgadmin
networks:
- lyric_wave_network
# Apache Airflow webserver container
lyric_wave_airflow_webserver:
image: ssanchez11/lyric_wave_apache_airflow:0.0.1
container_name: lyric-wave-airflow-webserver
restart: always
env_file:
- .env
depends_on:
- lyric_wave_postgres
- lyric_wave_redis
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./airflow/packages:/usr/local/airflow/packages
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
networks:
- lyric_wave_network
# Flower is a web-based tool for monitoring and administrating Celery clusters.
lyric_wave_celery_flower:
image: ssanchez11/lyric_wave_apache_airflow:0.0.1
container_name: lyric-wave-celery-flower
restart: always
env_file:
- .env
depends_on:
- lyric_wave_redis
ports:
- "8081:5555"
- "8082:8080"
- "8083:8793"
command: flower
networks:
- lyric_wave_network
# Apache Airflow scheduler container
lyric_wave_airflow_scheduler:
image: ssanchez11/lyric_wave_apache_airflow:0.0.1
container_name: lyric-wave-airflow-scheduler
restart: always
env_file:
- .env
depends_on:
- lyric_wave_airflow_webserver
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./airflow/packages:/usr/local/airflow/packages
ports:
- "8084:8080"
command: scheduler
networks:
- lyric_wave_network
# Apache Airflow worker containers
lyric_wave_airflow_worker_1:
image: ssanchez11/lyric_wave_apache_airflow:0.0.1
container_name: lyric-wave-airflow-worker-1
restart: always
env_file:
- .env
depends_on:
- lyric_wave_airflow_scheduler
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./airflow/packages:/usr/local/airflow/packages
command: worker
networks:
- lyric_wave_network
# Apache Airflow worker containers
lyric_wave_airflow_worker_2:
image: ssanchez11/lyric_wave_apache_airflow:0.0.1
container_name: lyric-wave-airflow-worker-2
restart: always
env_file:
- .env
depends_on:
- lyric_wave_airflow_scheduler
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./airflow/packages:/usr/local/airflow/packages
command: worker
networks:
- lyric_wave_network
# Lyric Wave API Song Generation API Service
lyric_wave_song_generation_api_service_1:
image: ssanchez11/lyric_wave_song_generation_api:0.0.1
container_name: lyric-wave-song-generation-api-service-1
restart: always
env_file:
- .env
networks:
- lyric_wave_network
# Lyric Wave API Song Generation API Service
lyric_wave_song_generation_api_service_2:
image: ssanchez11/lyric_wave_song_generation_api:0.0.1
container_name: lyric-wave-song-generation-api-service-2
restart: always
env_file:
- .env
networks:
- lyric_wave_network
# Lyric Wave API Song Generation API Service
lyric_wave_song_generation_api_service_3:
image: ssanchez11/lyric_wave_song_generation_api:0.0.1
container_name: lyric-wave-song-generation-api-service-3
restart: always
env_file:
- .env
networks:
- lyric_wave_network
lyric_wave_song_generation_haproxy:
image: haproxytech/haproxy-alpine:2.7
container_name: lyric-wave-song-generation-haproxy
volumes:
- ./haproxy/song_generation/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- '8086:5000'
- '1937:1936'
networks:
- lyric_wave_network
# Lyric Wave Streaming API Service
lyric_wave_streaming_api_service_1:
image: ssanchez11/lyric_wave_streaming_api:0.0.1
container_name: lyric-wave-streaming-api-service-1
restart: always
env_file:
- .env
networks:
- lyric_wave_network
# Lyric Wave Streaming API Service
lyric_wave_streaming_api_service_2:
image: ssanchez11/lyric_wave_streaming_api:0.0.1
container_name: lyric-wave-streaming-api-service-2
restart: always
env_file:
- .env
networks:
- lyric_wave_network
# Lyric Wave Streaming API Service
lyric_wave_streaming_api_service_3:
image: ssanchez11/lyric_wave_streaming_api:0.0.1
container_name: lyric-wave-streaming-api-service-3
restart: always
env_file:
- .env
networks:
- lyric_wave_network
lyric_wave_streaming_haproxy:
image: haproxytech/haproxy-alpine:2.7
container_name: lyric-wave-streaming-haproxy
volumes:
- ./haproxy/streaming/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- '8088:5000'
- '1938:1936'
networks:
- lyric_wave_network