mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-10-30 18:26:45 +00:00
#### Features - adds railwaytemplate casting - fix merge spec and status - allows to override moldings configuration Related: https://github.com/SigNoz/platform-pod/issues/1777
26 lines
879 B
Docker
26 lines
879 B
Docker
FROM clickhouse/clickhouse-keeper:25.5.6
|
|
|
|
# Copy all keeper config files
|
|
COPY keeper.d/ /etc/clickhouse-keeper/
|
|
# Create entrypoint script to dynamically select config based on replica index
|
|
RUN cat > /entrypoint.sh <<'EOF'
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Extract replica index from service name, default to 0
|
|
REPLICA_INDEX=$(echo "${RAILWAY_SERVICE_NAME:-}" | grep -oE "[0-9]+$" || echo "0")
|
|
CONFIG_FILE="/etc/clickhouse-keeper/keeper-${REPLICA_INDEX}.yaml"
|
|
|
|
# Fallback to keeper-0.yaml if replica-specific config doesn't exist
|
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
echo "Config $CONFIG_FILE not found, falling back to keeper-0.yaml"
|
|
CONFIG_FILE="/etc/clickhouse-keeper/keeper-0.yaml"
|
|
fi
|
|
|
|
echo "Starting ClickHouse Keeper with config: $CONFIG_FILE"
|
|
exec /usr/bin/clickhouse-keeper --config-file="$CONFIG_FILE" "$@"
|
|
EOF
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"] |