From 633cbe696e94833001053909858c0f52aa609ef3 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Wed, 26 Nov 2025 22:05:25 +0000 Subject: [PATCH] feat(platform-services): Add ClickHouse platform service support and improve related healthchecks and tooling --- changelog.md | 9 +++++++++ ts/00_commitinfo_data.ts | 2 +- ts/classes/httpserver.ts | 8 ++++---- ts/classes/platform-services/providers/clickhouse.ts | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index ec5ee9d..8804bb4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ # Changelog +## 2025-11-26 - 1.4.0 - feat(platform-services) +Add ClickHouse platform service support and improve related healthchecks and tooling + +- Add ClickHouse as a first-class platform service: register provider, provision/cleanup support and env var injection +- Expose ClickHouse endpoints in the HTTP API routing (list/get/start/stop/stats) and map default port (8123) +- Enable services to request ClickHouse as a platform requirement (enableClickHouse / platformRequirements) during deploy/provision flows +- Fix ClickHouse container health check to use absolute wget path (/usr/bin/wget) for more reliable in-container checks +- Add VS Code workspace launch/tasks/extensions configs for the UI (ui/.vscode/*) to improve local dev experience + ## 2025-11-26 - 1.3.0 - feat(platform-services) Add ClickHouse platform service support (provider, types, provisioning, UI and port mappings) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 90451e5..828f57b 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/onebox', - version: '1.3.0', + version: '1.4.0', description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers' } diff --git a/ts/classes/httpserver.ts b/ts/classes/httpserver.ts index 7da0e94..e3f31a5 100644 --- a/ts/classes/httpserver.ts +++ b/ts/classes/httpserver.ts @@ -297,16 +297,16 @@ export class OneboxHttpServer { // Platform Services endpoints } else if (path === '/api/platform-services' && method === 'GET') { return await this.handleListPlatformServicesRequest(); - } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy)$/) && method === 'GET') { + } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy|clickhouse)$/) && method === 'GET') { const type = path.split('/').pop()! as TPlatformServiceType; return await this.handleGetPlatformServiceRequest(type); - } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy)\/start$/) && method === 'POST') { + } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy|clickhouse)\/start$/) && method === 'POST') { const type = path.split('/')[3] as TPlatformServiceType; return await this.handleStartPlatformServiceRequest(type); - } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy)\/stop$/) && method === 'POST') { + } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy|clickhouse)\/stop$/) && method === 'POST') { const type = path.split('/')[3] as TPlatformServiceType; return await this.handleStopPlatformServiceRequest(type); - } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy)\/stats$/) && method === 'GET') { + } else if (path.match(/^\/api\/platform-services\/(mongodb|minio|redis|postgresql|rabbitmq|caddy|clickhouse)\/stats$/) && method === 'GET') { const type = path.split('/')[3] as TPlatformServiceType; return await this.handleGetPlatformServiceStatsRequest(type); } else if (path.match(/^\/api\/services\/[^/]+\/platform-resources$/) && method === 'GET') { diff --git a/ts/classes/platform-services/providers/clickhouse.ts b/ts/classes/platform-services/providers/clickhouse.ts index ebfc56d..306e3ae 100644 --- a/ts/classes/platform-services/providers/clickhouse.ts +++ b/ts/classes/platform-services/providers/clickhouse.ts @@ -166,10 +166,10 @@ export class ClickHouseProvider extends BasePlatformServiceProvider { // Use docker exec to run health check inside the container // This avoids network issues with overlay networks - // Note: ClickHouse image has wget but not curl + // Note: ClickHouse image has wget but not curl - use full path for reliability const result = await this.oneboxRef.docker.execInContainer( platformService.containerId, - ['wget', '-q', '-O', '-', 'http://localhost:8123/ping'] + ['/usr/bin/wget', '-q', '-O', '-', 'http://localhost:8123/ping'] ); if (result.exitCode === 0) {