-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
308 lines (287 loc) · 9.86 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
services:
localstack:
container_name: "snowplow-localstack"
image: localstack/localstack:3.8.1
ports:
- "4566:4566" # LocalStack Gateway
- "4510-4559:4510-4559" # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
- LS_LOG=debug # set to 'trace' for verbose
- MAIN_CONTAINER_NAME=localstack-main
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh"
stream-collector:
container_name: "snowplow-stream-collector"
image: snowplow/scala-stream-collector-kinesis:3.2.1-distroless
command: ["--config", "/snowplow/collector/config.hocon"]
depends_on:
- localstack
restart: always
ports:
- "8080:8080"
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_REGION=ap-southeast-2"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
volumes:
- "./collector/config.hocon:/snowplow/collector/config.hocon"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
- "host.docker.internal:host-gateway"
enrich:
container_name: "snowplow-enrich"
image: snowplow/snowplow-enrich-kinesis:5.0.0-distroless
command: ["--config", "/snowplow/enrich/enrich.hocon", "--iglu-config", "/snowplow/iglu-client/iglu_resolver.json", "--enrichments", "/snowplow/enrich/enrichments"]
depends_on:
- stream-collector
- iglu-server
restart: always
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_REGION=ap-southeast-2"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_ENDPOINT_URL=localhost.localstack.cloud:4566"
volumes:
- "./enrich:/snowplow/enrich"
- "./iglu-client:/snowplow/iglu-client"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
- "host.docker.internal:host-gateway"
postgres:
container_name: iglu-postgres
image: postgres:16
restart: always
ports:
- "5433:5432"
logging:
options:
max-size: 1G
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: igludb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "notsosecret"
iglu-server-setup:
container_name: "snowplow-iglu-server-setup"
image: snowplow/iglu-server:0.12.1-distroless
command: ["setup", "--config", "/snowplow/iglu-server/config.hocon"]
depends_on:
- postgres
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "IGLU_DB_PASSWORD=notsosecret"
volumes:
- "./iglu-server:/snowplow/iglu-server"
extra_hosts:
- "host.docker.internal:host-gateway"
iglu-server:
container_name: "snowplow-iglu-server"
image: snowplow/iglu-server:0.12.1-distroless
command: ["--config", "/snowplow/iglu-server/config.hocon"]
depends_on:
- iglu-server-setup
ports:
- "8081:8080"
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "IGLU_SUPER_API_KEY=deadbeef-dead-beef-dead-beefdeadbeef"
- "IGLU_DB_PASSWORD=notsosecret"
volumes:
- "./iglu-server:/snowplow/iglu-server"
extra_hosts:
- "host.docker.internal:host-gateway"
statsd:
container_name: "snowplow-statsd"
image: graphiteapp/graphite-statsd:latest
ports:
- "8125:8125/udp"
- "8126:8126"
- "81:80"
- "2003-2004:2003-2004"
- "2023-2024:2023-2024"
- "8084:8080"
environment:
- "STATSD_HOST=localhost"
- "STATSD_PORT=8125"
grafana:
container_name: "snowplow-grafana"
image: grafana/grafana:latest
depends_on:
- statsd
ports:
- "3000:3000"
volumes:
- "./grafana:/var/lib/grafana"
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources # Mount provisioning config
environment:
- "GF_SECURITY_ADMIN_PASSWORD=admin"
extra_hosts:
- "host.docker.internal:host-gateway"
website-home:
container_name: "example-website"
image: nginx:latest
depends_on:
- stream-collector
ports:
- "8082:80"
volumes:
- "./site:/usr/share/nginx/html"
redpanda-connect:
container_name: "connect"
image: docker.redpanda.com/redpandadata/connect:4.38.0
command: ["-c", "/benthos.yaml"]
ports:
- "4195:4195"
depends_on:
- enrich
- local-failed-ui
volumes:
- "./connect/benthos.yaml:/benthos.yaml"
- "./database:/database"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
- "host.docker.internal:host-gateway"
# # setup optional Snowflake streaming sink
snowflake-loader:
container_name: snowflake-streaming-loader
image: snowplow/snowflake-loader-kinesis:0.2.4-distroless
command: ["--config", "/loaders/snowflake_loader_kinesis.hocon"]
depends_on:
- enrich
volumes:
- "./loaders/snowflake_loader_kinesis.hocon:/loaders/snowflake_loader_kinesis.hocon"
profiles: [snowflake-loader]
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_REGION=ap-southeast-2"
# the below are set in your .env
- "SNOWFLAKE_URL=${SNOWFLAKE_URL}"
- "SNOWFLAKE_USERNAME=${SNOWFLAKE_USERNAME}"
- "SNOWFLAKE_PRIVATE_KEY=${SNOWFLAKE_PRIVATE_KEY}"
- "SNOWFLAKE_DATABASE=${SNOWFLAKE_DATABASE}"
- "SNOWFLAKE_SCHEMA=${SNOWFLAKE_SCHEMA}"
- "SNOWFLAKE_TABLE=${SNOWFLAKE_TABLE}"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
snowflake-incomplete-loader:
container_name: snowflake-streaming-loader-incomplete
image: snowplow/snowflake-loader-kinesis:0.2.4-distroless
command: ["--config", "/loaders/snowflake_loader_kinesis_incomplete.hocon"]
depends_on:
- enrich
volumes:
- "./loaders/snowflake_loader_kinesis_incomplete.hocon:/loaders/snowflake_loader_kinesis_incomplete.hocon"
profiles: [snowflake-incomplete-loader]
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_REGION=ap-southeast-2"
# the below are set in .env
- "SNOWFLAKE_URL=${SNOWFLAKE_URL}"
- "SNOWFLAKE_USERNAME=${SNOWFLAKE_USERNAME}"
- "SNOWFLAKE_PRIVATE_KEY=${SNOWFLAKE_PRIVATE_KEY}"
- "SNOWFLAKE_DATABASE=${SNOWFLAKE_DATABASE}"
- "SNOWFLAKE_SCHEMA=${SNOWFLAKE_SCHEMA}"
- "SNOWFLAKE_TABLE=${SNOWFLAKE_INCOMPLETE_TABLE}"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
lake-loader:
container_name: lake-loader
image: snowplow/lake-loader-aws:0.5.0
command: ["--config", "/loaders/lake_loader_config.hocon", "--iglu-config", "/snowplow/iglu-client/iglu_resolver.json"]
depends_on:
- enrich
- iglu-server
volumes:
- "./loaders/lake_loader_config_iceberg_s3.hocon:/loaders/lake_loader_config.hocon"
- "./iglu-client:/snowplow/iglu-client"
profiles: [lake-loader]
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566"
- "AWS_ENDPOINT_URL_S3=http://s3.localhost.localstack.cloud:4566"
- "AWS_ACCOUNT_ID=000000000000"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_REGION=ap-southeast-2"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
- "s3.localhost.localstack.cloud:host-gateway"
- "snowplow-lake-loader.s3.localhost.localstack.cloud:host-gateway"
bigquery-loader:
container_name: bigquery-loader
image: snowplow/bigquery-loader-kinesis:2.0.0-rc10-distroless
command: ["--config", "/loaders/bigquery_loader_config.hocon", "--iglu-config", "/snowplow/iglu-client/iglu_resolver.json"]
depends_on:
- enrich
- iglu-server
volumes:
- "./loaders/bigquery_loader_config.hocon:/loaders/bigquery_loader_config.hocon"
- "./iglu-client:/snowplow/iglu-client"
profiles: [bigquery-loader]
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "GCP_PROJECT_ID=${GCP_PROJECT_ID}"
- "BIGQUERY_DATASET=${BIGQUERY_DATASET}"
- "BIGQUERY_TABLE=${BIGQUERY_TABLE}"
- "SERVICE_ACCOUNT_CREDENTIALS=${SERVICE_ACCOUNT_CREDENTIALS}"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_REGION=ap-southeast-2"
- "AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566"
- "AWS_DEFAULT_REGION=ap-southeast-2"
- "DEFAULT_REGION=ap-southeast-2"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
snowbridge:
container_name: snowbridge
image: snowplow/snowbridge:2.4.2-aws-only
command: ["/opt/snowplow/snowbridge"]
depends_on:
- enrich
volumes:
- "./snowbridge:/snowbridge"
profiles: [snowbridge]
environment:
- "ACCEPT_LICENSE=${ACCEPT_LICENSE}"
- "AWS_REGION=ap-southeast-2"
- "AWS_ACCESS_KEY_ID=localstack"
- "AWS_SECRET_ACCESS_KEY=doesntmatter"
- "AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566"
- "SNOWBRIDGE_CONFIG_FILE=/snowbridge/config.hcl"
- "START_TIMESTAMP=${START_TIMESTAMP}"
extra_hosts:
- "localhost.localstack.cloud:host-gateway"
local-failed-ui:
container_name: "local-failed-ui"
image: "snowplow/failed-events-ui:0.0.1"
ports:
- "3001:3000"
ngrok:
container_name: ngrok-tunnel
image: ngrok/ngrok:latest
profiles: [tunnel]
restart: unless-stopped
command:
- "start"
- "--all"
- "--config"
- "/etc/ngrok.yml"
volumes:
- "./tunnel/ngrok.yml:/etc/ngrok.yml"
- "./tunnel/policy.yml:/etc/policy.yml"
ports:
- "4040:4040"