Files
NageshbansalandGitHub 611710e10e fix(clickhouse): templated per-node macros and single-host client DSN (#120)
#### Fixes

- Render templated per-node macros (`shard`, `replica`) in ClickHouse
`config.yaml` so multi-shard/multi-replica clusters get unique Keeper
paths instead of collisions
- Use the first TelemetryStore TCP address (not comma-joined) for
`SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN` and ingester ClickHouse DSNs

 #### Refactors
- `telemetrystore` molding now emits `config-{shard}-{replica}.yaml` per
node (mirrors `telemetrykeeper` per-replica pattern)

Related: https://github.com/SigNoz/platform-pod/issues/1332
2026-05-20 17:48:14 +05:30

36 lines
1.1 KiB
Docker

FROM clickhouse/clickhouse-server:25.5.6
COPY config.d/ /etc/clickhouse-server/
RUN mkdir -p /etc/clickhouse-server/user_scripts/ \
&& chown clickhouse:clickhouse /etc/clickhouse-server/user_scripts
ARG VERSION=v0.0.1
ENV CLICKHOUSE_CONFIG=/etc/clickhouse-server/config-0-0.yaml
ENV CLICKHOUSE_SKIP_USER_SETUP=1
# Download and install histogram-quantile binary
RUN cat > /tmp/install-histogram-quantile.sh <<'EOF'
#!/bin/bash
set -euo pipefail
node_os=$(uname -s | tr '[:upper:]' '[:lower:]')
node_arch=$(uname -m | sed 's/aarch64/arm64/' | sed 's/x86_64/amd64/')
echo "Fetching histogram-quantile for ${node_os}/${node_arch}"
cd /tmp
wget -O histogram-quantile.tar.gz \
"https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F${VERSION}/histogram-quantile_${node_os}_${node_arch}.tar.gz"
tar -xzf histogram-quantile.tar.gz
mv histogram-quantile /etc/clickhouse-server/user_scripts/histogramQuantile
rm histogram-quantile.tar.gz
echo "histogram-quantile installed successfully"
EOF
RUN chmod +x /tmp/install-histogram-quantile.sh \
&& /tmp/install-histogram-quantile.sh \
&& rm /tmp/install-histogram-quantile.sh