From 3990bebca31eff372c815e346f58d41080348535 Mon Sep 17 00:00:00 2001 From: Ikechukwu Eze <92305839+ikezedev@users.noreply.github.com> Date: Sun, 31 Jul 2022 19:50:25 +0200 Subject: [PATCH] add to supported databases --- apps/api/src/lib/common.ts | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index b18bfd003..656075d8e 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -467,7 +467,13 @@ export const supportedDatabaseTypesAndVersions = [ baseImage: 'bitnami/redis', versions: ['6.2', '6.0', '5.0'] }, - { name: 'couchdb', fancyName: 'CouchDB', baseImage: 'bitnami/couchdb', versions: ['3.2.1'] } + { name: 'couchdb', fancyName: 'CouchDB', baseImage: 'bitnami/couchdb', versions: ['3.2.1'] }, + { + name: 'edgedb', + fancyName: 'EdgeDB', + baseImage: 'edgedb/edgedb', + versions: ['2.0', '1.4'], + } ]; export async function startTraefikProxy(engine: string): Promise { @@ -693,6 +699,17 @@ export function generateDatabaseConfiguration(database: any): COUCHDB_PASSWORD: string; COUCHDB_USER: string; }; + } + | { + volume: string; + image: string; + ulimits: Record; + privatePort: number; + environmentVariables: { + EDGEDB_SERVER_PASSWORD: string; + EDGEDB_SERVER_USER: string; + EDGEDB_SERVER_DATABASE: string; + }; } { const { id, @@ -780,6 +797,18 @@ export function generateDatabaseConfiguration(database: any): volume: `${id}-${type}-data:/bitnami/couchdb`, ulimits: {} }; + } else if (type === 'edgedb') { + return { + privatePort: 5656, + environmentVariables: { + EDGEDB_SERVER_PASSWORD: rootUserPassword, + EDGEDB_SERVER_USER: rootUser, + EDGEDB_SERVER_DATABASE: defaultDatabase, + }, + image: `${baseImage}:${version}`, + volume: `${id}-${type}-data:/edgedb/edgedb`, + ulimits: {}, + }; } }