From f2f89ccfae497aa9e9ee9256fd1ee71b6bbd23b5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:59:13 +0100 Subject: [PATCH] fix(canvas): add SQLite to database engines Closes #12410 Co-Authored-By: Claude Opus 5.5 --- resources/js/deploy-canvas.js | 2 +- resources/js/deploy-canvas.test.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/js/deploy-canvas.js b/resources/js/deploy-canvas.js index 82d28ccd52..318e09f6a7 100644 --- a/resources/js/deploy-canvas.js +++ b/resources/js/deploy-canvas.js @@ -104,7 +104,7 @@ const POSTGRES_IMAGES = [ ['pgvector/pgvector:pg18', 'PGVector 18'], ['pgvector/pgvector:pg17', 'PGVector 17'], ]; -const DATABASES = [['postgresql', 'PostgreSQL'], ['mysql', 'MySQL'], ['mariadb', 'MariaDB'], ['mongodb', 'MongoDB'], ['redis', 'Redis'], ['keydb', 'KeyDB'], ['dragonfly', 'Dragonfly'], ['clickhouse', 'ClickHouse']]; +const DATABASES = [['postgresql', 'PostgreSQL'], ['mysql', 'MySQL'], ['mariadb', 'MariaDB'], ['mongodb', 'MongoDB'], ['redis', 'Redis'], ['keydb', 'KeyDB'], ['dragonfly', 'Dragonfly'], ['clickhouse', 'ClickHouse'], ['sqlite', 'SQLite']]; // One-click service templates ([key, name]), from the page (deploy-canvas.blade.php). let serviceTemplates = null; const templateOptions = () => { diff --git a/resources/js/deploy-canvas.test.js b/resources/js/deploy-canvas.test.js index a8fbecc2d7..1673ce4e33 100644 --- a/resources/js/deploy-canvas.test.js +++ b/resources/js/deploy-canvas.test.js @@ -1,7 +1,7 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import { freeSpot, zoomShortcut } from './canvas-core.js'; -import { canFollow, domainList, fresh, logoOf, onlyOption, parseEnvVars, planOf, splitImage, targetFrom, uniqueLabels, withDeploy, withoutSecrets, withTarget } from './deploy-canvas.js'; +import { TYPES, canFollow, domainList, fresh, logoOf, onlyOption, parseEnvVars, planOf, splitImage, targetFrom, uniqueLabels, withDeploy, withoutSecrets, withTarget } from './deploy-canvas.js'; test('splits the tag out of an image name', () => { assert.deepEqual(splitImage('nginx:alpine', 'latest'), { name: 'nginx', tag: 'alpine' }); @@ -167,6 +167,7 @@ test('shows the logo of what a source step creates, like the rest of Coolify', ( assert.equal(src('database', { engine: 'postgresql' }), '/svgs/resources/postgres.svg'); assert.equal(src('database', { engine: 'mysql' }), '/svgs/resources/mysql.svg'); assert.equal(logoOf(node('n', 'database', { engine: 'keydb' })).dark, '/svgs/resources/keydb-dark.svg'); + assert.equal(src('database', { engine: 'sqlite' }), '/svgs/resources/sqlite.svg'); assert.equal(src('git', { mode: 'public', buildPack: 'railpack' }), '/svgs/resources/public-repo.svg'); assert.equal(src('git', { mode: 'github', buildPack: 'railpack' }), '/svgs/resources/github-app.svg'); assert.equal(src('git', { mode: 'key', buildPack: 'railpack' }), '/svgs/resources/deploy-key.svg'); @@ -187,3 +188,8 @@ test('reads the browser zoom shortcut so the canvas can zoom instead', () => { assert.equal(key('-', { ctrlKey: true, altKey: true }), null); assert.equal(key('s', { metaKey: true }), null); }); + +test('offers every database engine of the New resource page', () => { + const engines = TYPES.database.fields.find(f => f.key === 'engine').options.map(([value]) => value); + assert.deepEqual(engines, ['postgresql', 'mysql', 'mariadb', 'mongodb', 'redis', 'keydb', 'dragonfly', 'clickhouse', 'sqlite']); +});