forked from Armaan1Gohil/dataengineering-tech-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
209 lines (201 loc) · 5.01 KB
/
docker-compose.yaml
File metadata and controls
209 lines (201 loc) · 5.01 KB
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
services:
# Container for Storage (Minio)
object-storage:
build:
context: ./minio_data
dockerfile: minio.Dockerfile
container_name: storage
volumes:
- ./minio_data:/data_project/data:rw
ports:
- "9000:9000"
- "9001:9001"
env_file:
- .env/minio.env
stdin_open: true
tty: true
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9000/minio/health/live || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# Container for Orchestration (Airflow)
airflow:
build:
context: ./airflow
dockerfile: airflow.Dockerfile
container_name: airflow
env_file:
- .env/airflow.env
volumes:
- ./airflow/dags:/opt/airflow/dags
- ./airflow/plugins:/opt/airflow/plugins
- ./airflow/logs:/opt/airflow/logs
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8081:8080"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
depends_on:
postgres:
condition: service_healthy
airflow-scheduler:
build:
context: ./airflow
dockerfile: airflow-scheduler.Dockerfile
container_name: airflow-scheduler
volumes:
- ./airflow/dags:/opt/airflow/dags
- ./airflow/plugins:/opt/airflow/plugins
- ./airflow/logs:/opt/airflow/logs
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- .env/airflow.env
depends_on:
postgres:
condition: service_healthy
# Container for Extracting Data (Web Scraping)
extraction:
build:
context: ./ingestion
dockerfile: ingestion.Dockerfile
container_name: extraction
volumes:
- ./ingestion:/data_project/ingestion:rw
ports:
- "8888:8888"
env_file:
- .env/minio.env
stdin_open: true
tty: true
depends_on:
object-storage:
condition: service_healthy
airflow:
condition: service_healthy
# Container for Metadata (Postgres)
postgres:
build:
context: ./postgres
dockerfile: postgres.Dockerfile
container_name: postgres
env_file:
- .env/postgres.env
ports:
- "5432:5432"
volumes:
- ./postgres/postgres_data:/var/lib/postgresql/data:rw
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Container for Data Catalog (Nessie)
nessie:
image: ghcr.io/projectnessie/nessie:0.100.2-java
container_name: nessie
env_file:
- .env/nessie.env
depends_on:
postgres:
condition: service_healthy
object-storage:
condition: service_healthy
airflow:
condition: service_healthy
ports:
- "19120:19120"
stdin_open: true
tty: true
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:19120/api/v1/config || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Container for Transformations (Spark)
transformation:
build:
context: ./transformation
dockerfile: transformation.Dockerfile
container_name: transformation
volumes:
- ./transformation:/data_project/transformation:rw
ports:
- "8889:8888"
- "4040:4040"
- "7070:7070"
env_file:
- .env/minio.env
stdin_open: true
tty: true
restart: always
depends_on:
object-storage:
condition: service_healthy
postgres:
condition: service_healthy
nessie:
condition: service_healthy
airflow:
condition: service_healthy
# Container for Query Engine (Trino)
trino:
image: trinodb/trino:467
container_name: trino
ports:
- "8080:8080"
volumes:
- ./trino/etc:/etc/trino:rw
- ./trino/data:/var/trino:rw
env_file:
- .env/minio.env
environment:
- JAVA_TOOL_OPTIONS=-Duser.timezone=UTC
depends_on:
postgres:
condition: service_healthy
object-storage:
condition: service_healthy
nessie:
condition: service_healthy
airflow:
condition: service_healthy
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/v1/info || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# Container for Visualization (Superset)
superset:
build:
context: ./superset
dockerfile: superset.Dockerfile
container_name: superset
depends_on:
postgres:
condition: service_healthy
trino:
condition: service_healthy
nessie:
condition: service_healthy
airflow:
condition: service_healthy
env_file:
- .env/postgres.env
- .env/superset.env
ports:
- "8088:8088"
restart: always
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8088/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3