-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
231 lines (213 loc) · 7.02 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
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
version: '3.8'
x-volumes-meltano: &volumes-meltano
volumes:
- ./data_pipeline/meltano.yml:/project/data_pipeline/meltano.yml
- ./data_pipeline/meltano_conf:/project/data_pipeline/meltano_conf
- ./data_pipeline/plugins:/project/data_pipeline/plugins
- ./.env.base:/project/.env.base
- ./.env.custom.local:/project/.env.custom.local
- ./.env.local:/project/.env.local
- ./.env.prefix_dbt_vars:/project/.env.prefix_dbt_vars
- ./Makefile:/project/Makefile
x-volumes-dbt: &volumes-dbt
volumes:
- ./data_pipeline/macros:/project/data_pipeline/macros
- ./data_pipeline/models:/project/data_pipeline/models
- ./data_pipeline/profile/profiles.yml:/project/data_pipeline/profile/profiles.yml
- ./data_pipeline/dbt_project.yml:/project/data_pipeline/dbt_project.yml
- ./data_pipeline/gooddata.yml:/project/data_pipeline/gooddata.yml
- ./data_pipeline/gooddata_profiles.yaml:/root/.gooddata/profiles.yaml
- ./.env.base:/project/.env.base
- ./.env.custom.local:/project/.env.custom.local
- ./.env.local:/project/.env.local
- ./.env.prefix_dbt_vars:/project/.env.prefix_dbt_vars
- ./Makefile:/project/Makefile
x-volumes-gooddata: &volumes-gooddata
volumes:
- ./data_pipeline/gooddata_layouts:/project/data_pipeline/gooddata_layouts
- ./data_pipeline/gooddata.yml:/project/data_pipeline/gooddata.yml
- ./data_pipeline/gooddata_profiles.yaml:/root/.gooddata/profiles.yaml
- ./.env.base:/project/.env.base
- ./.env.custom.local:/project/.env.custom.local
- ./.env.local:/project/.env.local
- ./.env.prefix_dbt_vars:/project/.env.prefix_dbt_vars
- ./Makefile:/project/Makefile
services:
gooddata-cn-ce:
# You can use "dev_latest" tag which points to the latest development version of GD.CN
image: gooddata/gooddata-cn-ce:3.14.0
ports:
- "3000:3000"
- "5432:5432"
volumes:
- gooddata-data-pipeline:/data
environment:
GDCN_LICENSE_KEY: "${GDCN_LICENSE_KEY}"
APP_LOGLEVEL: "INFO"
GDC_FEATURES_VALUES_ENABLE_METRIC_SQL_AND_DATA_EXPLAIN: 'ENABLED'
LIMIT_MAX_RESULT_XTAB_DIMENSION: 200000
GDC_FEATURES_VALUES_ENABLE_PDM_REMOVAL_DEPRECATION_PHASE: "true"
METADATA_API_JAVA_OPTS: "-Xmx1024m -Xms512m"
bootstrap_origins:
image: alpine/curl
entrypoint:
- /bin/sh
- -c
environment:
GOODDATA_TOKEN: "YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz"
GOODDATA_ORGANIZATION: default
command:
- |
curl -v -H "Authorization: Bearer $$GOODDATA_TOKEN" -s -H "Content-Type: application/vnd.gooddata.api+json" -H "Host: localhost" -X PATCH \
-d "{
\"data\": {
\"id\": \"$$GOODDATA_ORGANIZATION\",
\"type\": \"organization\",
\"attributes\": {
\"allowedOrigins\": [\"https://localhost:8443\"]
}
}
}" \
gooddata-cn-ce:3000/api/v1/entities/admin/organizations/$$GOODDATA_ORGANIZATION
extract_load_github:
build:
context: .
dockerfile: Dockerfile_meltano
entrypoint:
- /bin/bash
- -c
command:
# We have to link .meltano to data_pipeline folder to be able to utilize make targets
# We cannot store .meltano in data_pipeline folder because in the CICD pipeline it would be overriden by git clone
# We do the same linking in the CICD jobs too
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/.meltano $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/.meltano
make extract_load_github
<<: *volumes-meltano
extract_load_faa:
build:
context: .
dockerfile: Dockerfile_meltano
entrypoint:
- /bin/bash
- -c
command:
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/.meltano $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/.meltano
make extract_load_faa
<<: *volumes-meltano
extract_load_ecommerce_demo:
build:
context: .
dockerfile: Dockerfile_meltano
entrypoint:
- /bin/bash
- -c
command:
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/.meltano $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/.meltano
make extract_load_ecommerce_demo
<<: *volumes-meltano
extract_load_data_science:
build:
context: .
dockerfile: Dockerfile_meltano
entrypoint:
- /bin/bash
- -c
command:
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/.meltano $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/.meltano
make extract_load_data_science
<<: *volumes-meltano
extract_load_jira:
build:
context: .
dockerfile: Dockerfile_meltano
entrypoint:
- /bin/bash
- -c
command:
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/.meltano $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/.meltano
make extract_load_jira
<<: *volumes-meltano
transform:
build:
context: .
dockerfile: Dockerfile_dbt
entrypoint:
- /bin/bash
- -c
command:
# We have to link dbt_packages to data_pipeline folder to be able to utilize make targets
# We cannot store dbt_packages in data_pipeline folder because in the CICD pipeline it would be overriden by git clone
# We do the same linking in the CICD jobs too
- |
source .env.local aio
ln -nfs $$IMAGES_WORKDIR/dbt_packages $$IMAGES_WORKDIR/$$SRC_DATA_PIPELINE/dbt_packages
make transform
make deploy_models
<<: *volumes-dbt
analytics:
build:
context: .
dockerfile: Dockerfile_gooddata
entrypoint:
- /bin/bash
- -c
command:
- |
source .env.local aio
make deploy_analytics
<<: *volumes-gooddata
# Minio serves as AWS S3 state backend for extract_load (Meltano)
minio:
image: minio/minio:RELEASE.2023-09-30T07-02-29Z
volumes:
- minio-data:/data
ports:
- '19000:9000'
- '19001:19001'
environment:
MINIO_ROOT_USER: minio_abcde_k1234567
MINIO_ROOT_PASSWORD: minio_abcde_k1234567_secret1234567890123
command: server --console-address ":19001" /data
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
minio-bootstrap:
image: minio/mc:RELEASE.2023-09-29T16-41-22Z
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set my_minio http://minio:9000 minio_abcde_k1234567 minio_abcde_k1234567_secret1234567890123;
/usr/bin/mc mb my_minio/meltano;
/usr/bin/mc policy set public my_minio/meltano;
/usr/bin/mc mb my_minio/gdc-jacek-test-redshift;
/usr/bin/mc policy set public my_minio/gdc-jacek-test-redshift;
exit 0;
"
vertica:
image: vertica/vertica-ce:12.0.4-0
environment:
APP_DB_USER: "demouser"
APP_DB_PASSWORD: "demopass"
TZ: "Europe/Prague"
ports:
- "5433:5433"
- "5444:5444"
volumes:
- vertica-data:/data
volumes:
gooddata-data-pipeline:
minio-data:
vertica-data: