-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
201 lines (189 loc) · 4.67 KB
/
docker-compose.yaml
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
services:
# psql
thes_psql:
build:
context: ./datasource_init
dockerfile: ./Dockerfile
image: postgres:16-alpine
container_name: thes_psql
volumes:
- ./datasource_init/warehouse_setup/:/docker-entrypoint-initdb.d/
- ./datasource_init/data:/data/
- ./postgresql:/var/lib/postgresql/data/
- shared_volume:/shared_data/
ports:
- "5432:5432"
env_file:
- .env
environment:
- POSTGRES_DB=admin_database
- POSTGRES_USER=admin_user
- POSTGRES_PASSWORD=admin123
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- thes_network
# dbt
dbt_processing:
build:
context: ./dbt_processing/transform
dockerfile: ./Dockerfile
image: dbt_processing:latest
container_name: dbt_processing
depends_on:
thes_psql:
condition: service_completed_successfully
env_file:
- .env
networks:
- thes_network
ports:
- "4001:4001"
# pipeline
dagster_dbt_processing:
build:
context: ./
dockerfile: ./Dockerfile
image: dagster_dbt_processing:latest
container_name: dagster_dbt_processing
depends_on:
thes_psql:
condition: service_completed_successfully
env_file:
- .env
volumes:
- shared_volume:/opt/dagster/app/datasource_init/data
- shared_volume_app:/opt/dagster/app/processed_data
networks:
- thes_network
ports:
- "4000:4000"
# dashboard_app
dashboard_app:
build:
context: ./processed_data
dockerfile: ./Dockerfile
image: analytics-processing-pipeline-dashboard_app:latest
container_name: dashboard_app
env_file:
- .env
depends_on:
dagster_dbt_processing:
condition: service_completed_successfully
volumes:
- ./shared_volume_app:/usr/src/app
networks:
- thes_network
# dagster_home
dagster:
build:
context: ./dagster_home
dockerfile: ./Dockerfile
image: thes_dagster:latest
container_name: dagster
depends_on:
dagster_dbt_processing:
condition: service_completed_successfully
env_file:
- .env
networks:
- thes_network
external_links:
- dagster_dbt_processing:dagster_dbt_processing
- dagster_postgres:dagster_postgres
dagster_postgres:
image: postgres:16
container_name: dagster_postgres
depends_on:
dagster_dbt_processing:
condition: service_completed_successfully
ports:
- "5433:5433"
env_file:
- .env
environment:
- DAGSTER_PG_DB=postgres
- DAGSTER_PG_USER=admin_user
- DAGSTER_PG_PASSWORD=admin123
- DAGSTER_PG_HOST=dagster_postgres
- DAGSTER_PG_DB_HOST_AUTH_METHOD=trust
volumes:
- dagster_postgres_data:/var/lib/postgresql/data
networks:
- thes_network
external_links:
- dagster:dagster
dagster_webserver:
image: thes_dagster:latest
entrypoint:
- dagster-webserver
- -h
- "0.0.0.0"
- -p
- "3000"
- -w
- workspace.yaml
container_name: dagster_webserver
depends_on:
dagster:
condition: service_completed_successfully
volumes: # Make docker client accessible, so we can terminate containers from dagit
- /var/run/docker.sock:/var/run/docker.sock
- ./dagster_home:/opt/dagster/dagster_home
expose:
- "3000"
ports:
- "3000:3000"
env_file:
- .env
networks:
- thes_network
dagster_deamon:
image: thes_dagster:latest
entrypoint:
- dagster-daemon
- run
- -w
- workspace.yaml
container_name: dagster_deamon
depends_on:
dagster:
condition: service_completed_successfully
volumes: # Make docker client accessible, so we can launch containers using host docker
- /var/run/docker.sock:/var/run/docker.sock
- ./dagster_home:/opt/dagster/dagster_home
env_file:
- .env
networks:
- thes_network
# minio
thes_minio:
hostname: minio
image: minio/minio
container_name: thes_minio
ports:
- "9001:9001"
- "9000:9000"
command: [ "server", "/data", "--console-address", ":9001" ]
volumes:
- ./minio:/data
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=minio123
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
networks:
- thes_network
volumes:
shared_volume:
driver: local
name: shared_volume
shared_volume_app:
driver: local
name: shared_volume_app
dagster_postgres_data:
driver: local
name: dagster_postgres_data
networks:
thes_network:
driver: bridge
name: thes_network