-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
125 lines (117 loc) · 3.34 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
services:
kafka-broker:
image: docker.redpanda.com/redpandadata/redpanda:v24.2.1
command: |
redpanda start
--smp 1
--overprovisioned
--node-id 0
--kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
--advertise-kafka-addr internal://kafka-broker:9092,external://localhost:9092
--pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
--advertise-pandaproxy-addr internal://kafka-broker:8082,external://localhost:18082
--schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
--rpc-addr kafka-broker:33145
--advertise-rpc-addr kafka-broker:33145
--mode dev-container
--set auto_create_topics_enabled=true
ports:
- 18081:18081
- 18082:18082
- 9092:19092
- 19644:9644
console:
image: docker.redpanda.com/redpandadata/console:v2.6.1
entrypoint: /bin/sh
command: |-
-c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml; /app/console'
ports:
- 8080:8080
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: >
kafka:
brokers: ["kafka-broker:9092"]
schemaRegistry:
enabled: true
urls: ["http://kafka-broker:8081"]
redpanda:
adminApi:
enabled: true
urls: ["http://kafka-broker:9644"]
connect:
enabled: true
clusters:
- name: local-connect-cluster
url: http://connect:8083
bitcoin-source-producer:
container_name: bitcoin-source-producer
restart: always
build:
context: "./bitcoin_source_producer"
environment:
- KAFKA_BROKER_ADDRESS=kafka-broker:9092
- OUTPUT_TOPIC_NAME=trades-raw
- KRAKEN_API_URL=wss://ws.kraken.com/v2
- KRAKEN_SYMBOL_PAIRS=["BTC/USD"]
depends_on:
- kafka-broker
ohlc-aggregator:
container_name: ohlc-aggregator
restart: always
build:
context: "./ohlc_aggregator"
environment:
- KAFKA_BROKER_ADDRESS=kafka-broker:9092
- INPUT_TOPIC_NAME=trades-raw
- OUTPUT_TOPIC_NAME=trades-ohlc
- OHLC_WINDOW_DURATION_MS=60000
- OHLC_WINDOW_GRACE_MS=5000
depends_on:
- kafka-broker
database:
image: postgres:16-alpine
environment:
- POSTGRES_DB=quix
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
volumes:
- postgresql:/var/lib/postgresql/data
ports:
- 5432:5432
database_sink:
container_name: database_sink
restart: always
build:
context: "./database_sink"
volumes:
- /dev/null:/app/.env
environment:
- KAFKA_BROKER_ADDRESS=kafka-broker:9092
- INPUT_TOPIC_NAME=trades-ohlc
- POSTGRESQL_HOST=database
- POSTGRESQL_PORT=5432
- POSTGRESQL_DATABASE=quix
- POSTGRESQL_USER=user
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_TABLE=ohlc
depends_on:
- database
database_query_test:
container_name: database_query_test
restart: always
build:
context: "./database_query_test"
volumes:
- /dev/null:/app/.env
environment:
- POSTGRESQL_HOST=database
- POSTGRESQL_PORT=5432
- POSTGRESQL_DATABASE=quix
- POSTGRESQL_USER=user
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_TABLE=ohlc
depends_on:
- database
volumes:
postgresql: