/
docker-compose.yml
74 lines (70 loc) · 2.03 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
version: '3.8'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
healthcheck:
test: ["CMD", "nc", "-vz", "localhost", "2181"]
interval: 10s
timeout: 10s
retries: 3
restart: on-failure
# Message Queues
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_CREATE_TOPICS: "greetings:1:1,castiron_etl_config:1:1,castiron_etl_source_file:4:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
zookeeper:
condition: service_healthy
healthcheck:
test: ["CMD", "nc", "-vz", "localhost", "9092"]
interval: 10s
timeout: 10s
retries: 3
restart: on-failure
# Object Storage
minio:
image: minio/minio
environment:
MINIO_ROOT_USER: castiron
MINIO_ROOT_PASSWORD: castiron
#for more information see https://docs.min.io/docs/minio-bucket-notification-guide.html#apache-kafka
#the following represent two sets of configs for two separate MINIO notification ARN
MINIO_NOTIFY_KAFKA_BROKERS_config: kafka:9092
MINIO_NOTIFY_KAFKA_ENABLE_config: 'on'
MINIO_NOTIFY_KAFKA_TOPIC_config: castiron_etl_config
MINIO_NOTIFY_KAFKA_BROKERS_source: kafka:9092
MINIO_NOTIFY_KAFKA_ENABLE_source: 'on'
MINIO_NOTIFY_KAFKA_TOPIC_source: castiron_etl_source_file
entrypoint: /usr/bin/docker-entrypoint.sh server /data --console-address :9001
ports:
- "9001:9001"
depends_on:
kafka:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
start_period: 120s
retries: 3
restart: always
# Workflow Tracking
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD=12345678
POSTGRES_DB=castiron
POSTGRES_USER=castiron
PGDATA=/data
volumes:
- "pg_data_vol:/data"