diff --git a/docker/scripts/entrypoint.sh b/docker/scripts/entrypoint.sh index a6bc7dd15b9..aa73324e135 100755 --- a/docker/scripts/entrypoint.sh +++ b/docker/scripts/entrypoint.sh @@ -18,17 +18,8 @@ if [ -n "$CLICKHOUSE_URL" ] && [ "$SKIP_CLICKHOUSE_MIGRATIONS" != "1" ]; then echo "Running ClickHouse migrations..." export GOOSE_DRIVER=clickhouse - # Ensure secure=true is in the connection string - if echo "$CLICKHOUSE_URL" | grep -q "secure="; then - # secure parameter already exists, use as is - export GOOSE_DBSTRING="$CLICKHOUSE_URL" - elif echo "$CLICKHOUSE_URL" | grep -q "?"; then - # URL has query parameters, append secure=true - export GOOSE_DBSTRING="${CLICKHOUSE_URL}&secure=true" - else - # URL has no query parameters, add secure=true - export GOOSE_DBSTRING="${CLICKHOUSE_URL}?secure=true" - fi +# Use the provided ClickHouse URL directly +export GOOSE_DBSTRING="$CLICKHOUSE_URL" export GOOSE_MIGRATION_DIR=/triggerdotdev/internal-packages/clickhouse/schema /usr/local/bin/goose up