-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
126 lines (119 loc) · 4.8 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
version: '3.8'
services:
redpanda:
image: docker.vectorized.io/vectorized/redpanda:${REDPANDA_VERSION}
restart: unless-stopped
container_name: ${REDPANDA_CONTAINER_NAME}
command:
- redpanda start
- --overprovisioned
- --smp 1
- --memory 1G
- --reserve-memory 0M
- --node-id 0
- --check=false
- --kafka-addr 0.0.0.0:${REDPANDA_PORT_KAFKA_INTERNAL}
- --advertise-kafka-addr redpanda:${REDPANDA_PORT_KAFKA_INTERNAL}
- --pandaproxy-addr 0.0.0.0:${REDPANDA_PORT_HTTP_INTERNAL}
- --advertise-pandaproxy-addr redpanda:${REDPANDA_PORT_HTTP_INTERNAL}
- --set redpanda.enable_transactions=true
- --set redpanda.enable_idempotence=true
ports:
- "${REDPANDA_PORT_SCHEMA_EXTERNAL}:${REDPANDA_PORT_SCHEMA_INTERNAL}" # Schema Registry port
- "${REDPANDA_PORT_HTTP_EXTERNAL}:${REDPANDA_PORT_HTTP_INTERNAL}" # HTTP Proxy port
- "${REDPANDA_PORT_KAFKA_EXTERNAL}:${REDPANDA_PORT_KAFKA_INTERNAL}" # Kafka API port
- "${REDPANDA_PORT_PROMETHEUS_EXTERNAL}:${REDPANDA_PORT_PROMETHEUS_INTERNAL}" # Prometheus and HTTP admin port
- "${REDPANDA_PORT_GRPC_EXTERNAL}:${REDPANDA_PORT_GRPC_INTERNAL}" # internal RPC port
volumes:
- redpanda:/var/lib/redpanda/data
healthcheck: {test: "curl -f localhost:${REDPANDA_PORT_PROMETHEUS_INTERNAL}/v1/status/ready", interval: 1s, start_period: 30s}
redpanda-console:
image: docker.redpanda.com/vectorized/console:${REDPANDA_CONSOLE_VERSION}
restart: unless-stopped
container_name: redpanda-console
entrypoint: /bin/sh
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: |
kafka:
brokers: ["redpanda:${REDPANDA_PORT_KAFKA_INTERNAL}"]
schemaRegistry:
enabled: true
urls: ["http://redpanda:${REDPANDA_PORT_SCHEMA_INTERNAL}"]
connect:
enabled: true
clusters:
- name: datagen
url: http://connect:${REDPANDA_PORT_CONNECT_INTERNAL}
ports:
- "${REDPANDA_CONSOLE_PORT_EXTERNAL}:${REDPANDA_CONSOLE_PORT_INTERNAL}"
healthcheck: { test: "curl -f localhost:${REDPANDA_CONSOLE_PORT_INTERNAL}", interval: 1s, start_period: 30s }
depends_on:
redpanda:
condition: service_healthy
connect:
image: docker.cloudsmith.io/redpanda/connectors/connectors:624ff9e
restart: unless-stopped
hostname: connect
container_name: connect
ports:
- "8083:8083"
environment:
KAFKA_CONNECT_CONFIGURATION: |
offset.storage.topic=docker-connect-offsets
value.converter=org.apache.kafka.connect.json.JsonConverter
config.storage.topic=docker-connect-configs
key.converter=org.apache.kafka.connect.json.JsonConverter
group.id=compose-connect-group
status.storage.topic=docker-connect-status
config.storage.replication.factor=1
offset.storage.replication.factor=1
status.storage.replication.factor=1
KAFKA_CONNECT_METRICS_ENABLED: "false"
KAFKA_CONNECT_BOOTSTRAP_SERVERS: redpanda:9092
KAFKA_GC_LOG_ENABLED: "false"
KAFKA_HEAP_OPTS: -Xms128M
depends_on:
redpanda:
condition: service_healthy
materialized:
image: materialize/materialized:${MATERIALIZED_VERSION}
container_name: ${MATERIALIZED_CONTAINER_NAME}
depends_on:
redpanda:
condition: service_healthy
restart: unless-stopped
environment:
# TODO: minio
MZ_PERSIST_BLOB_URL: file:///tmp/blob.blob
MZ_ORCHESTRATOR: process
MZ_ORCHESTRATOR_PROCESS_SECRETS_DIRECTORY: /tmp/secrets
ports:
- "${MATERIALIZED_PORT_DB_EXTERNAL}:${MATERIALIZED_PORT_DB_INTERNAL}"
- "${MATERIALIZED_PORT_HTTP_EXTERNAL}:${MATERIALIZED_PORT_HTTP_INTERNAL}"
healthcheck:
test: "PGHOST=${MATERIALIZED_CONTAINER_NAME} PGPORT=${MATERIALIZED_PORT_DB_INTERNAL} PGDATABASE=${MATERIALIZED_DATABASE} PGUSER=${MATERIALIZED_USERNAME} PGPASSWORD=${MATERIALIZED_PASSWORD} pg_isready"
interval: 5s
start_period: 45s
dbt:
image: ${DBT_IMAGE}:${DBT_VERSION}
container_name: ${DBT_CONTAINER_NAME}
restart: "no"
stdin_open: true
tty: true
command: bash -c 'dbt run --project-dir=/usr/app; dbt docs generate --project-dir=/usr/app; dbt docs serve --project-dir=/usr/app'
volumes:
- ./etc/dbt/app/dbt/example:/usr/app/
- ./etc/dbt/profile/:/root/.dbt/
ports:
- "${DBT_PORT_EXTERNAL}:${DBT_PORT_INTERNAL}"
environment:
DBT_PROFILES_DIR: /root/.dbt
TZ: Etc/GMT+1
depends_on:
materialized:
condition: service_healthy
healthcheck: { test: "curl -f localhost:${DBT_PORT_INTERNAL}", interval: 1s, start_period: 30s }
volumes:
redpanda: