| name | clickhouse-deploy-integration |
| description | Deploy ClickHouse-backed applications to Vercel, Fly.io, and Cloud Run with
connection pooling, secrets, and health checks.
Use when deploying applications that connect to ClickHouse Cloud, configuring
platform secrets, or setting up deployment pipelines to serverless or
container hosts.
Trigger with "deploy clickhouse app", "clickhouse Vercel", "clickhouse Cloud
Run", "clickhouse production deploy", "clickhouse Fly.io".
|
| allowed-tools | Read, Write, Edit, Bash(vercel:*), Bash(fly:*), Bash(gcloud:*) |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","database","analytics","clickhouse","olap"] |
| compatibility | Designed for Claude Code |
ClickHouse Deploy Integration
Overview
Deploy applications that connect to ClickHouse Cloud from serverless and
container platforms with proper connection management and secrets handling. The
same platform-agnostic connection module drives all three targets — Vercel,
Fly.io, and Cloud Run — so only the secrets mechanism and runtime model change
per platform.
Prerequisites
- ClickHouse Cloud instance (or self-hosted with public endpoint)
- Platform CLI installed (vercel, fly, or gcloud)
- Application tested locally against ClickHouse
Instructions
Step 1: ClickHouse Connection Module (Platform-Agnostic)
Write a singleton client so a serverless cold start reuses one connection
instead of opening a new pool per invocation. Keep max_open_connections low
for serverless and enable compression to cut egress.
import { createClient, ClickHouseClient } from '@clickhouse/client';
let client: ClickHouseClient | null = null;
export function getClickHouse(): ClickHouseClient {
if (!client) {
client = createClient({
url: process.env.CLICKHOUSE_HOST!,
username: process.env.CLICKHOUSE_USER!,
password: process.env.CLICKHOUSE_PASSWORD!,
database: process.env.CLICKHOUSE_DATABASE ?? 'default',
request_timeout: 30_000,
: ,
: {
: ,
: ,
},
});
}
client;
}