kafka-ingest-concept/templates/docker-compose.clickhouse.yaml
kjuulh a0be74c4d8
feat: with clickhouse
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-08-05 22:24:11 +02:00

44 lines
943 B
YAML

services:
clickhouse-server:
image: clickhouse/clickhouse-server:24-alpine
container_name: clickhouse-server-1
hostname: clickhouse-server-1
ports:
- "8123:8123"
- "9000:9000"
- "9004:9004"
expose:
- 8123
- 9009
configs:
- source: clickhouse_init
target: /docker-entrypoint-initdb.d/init-db.sh
clickhouse-ui:
image: "ghcr.io/caioricciuti/ch-ui:latest"
ports:
- 5521:5521
environment:
- VITE_CLICKHOUSE_URL=http://localhost:8123
- VITE_CLICKHOUSE_USER=default
#- VITE_CLICKHOUSE_PASS=default
depends_on:
- clickhouse-server
configs:
clickhouse_init:
content: |
#!/bin/bash
set -e
clickhouse client -n <<-EOSQL
CREATE table click_stats(
clicks_count Int64,
ad_id Int64
)ENGINE = ReplacingMergeTree
PRIMARY KEY (ad_id);
EOSQL