From d6d3fb46cc4679562e35d229a6aac0784f10503e Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 10 Sep 2022 07:14:17 +0000 Subject: [PATCH 1/8] fix: volumes for services --- apps/api/src/lib/services/handlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/lib/services/handlers.ts b/apps/api/src/lib/services/handlers.ts index f2f0aafa9..903f53035 100644 --- a/apps/api/src/lib/services/handlers.ts +++ b/apps/api/src/lib/services/handlers.ts @@ -655,7 +655,7 @@ async function startLanguageToolService(request: FastifyRequest) { [id]: { container_name: id, image: config.n8n.image, - volumes: config.n8n, + volumes: config.n8n.volumes, environment: config.n8n.environmentVariables, labels: makeLabelForServices('n8n'), ...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}), From bc66b98176f9e72ae1217e2fdfcaffa79badd299 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 10 Sep 2022 07:14:30 +0000 Subject: [PATCH 2/8] fix: build secrets for apps --- apps/api/src/lib/buildPacks/common.ts | 3 --- apps/api/src/lib/buildPacks/docker.ts | 1 + apps/api/src/lib/buildPacks/node.ts | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/api/src/lib/buildPacks/common.ts b/apps/api/src/lib/buildPacks/common.ts index f4195e24a..0e188ae36 100644 --- a/apps/api/src/lib/buildPacks/common.ts +++ b/apps/api/src/lib/buildPacks/common.ts @@ -556,7 +556,6 @@ export function checkPnpm(installCommand = null, buildCommand = null, startComma ); } - export async function buildImage({ applicationId, tag, @@ -677,8 +676,6 @@ export async function buildCacheImageWithNode(data, imageForBuild) { secrets, pullmergeRequestId } = data; - - const isPnpm = checkPnpm(installCommand, buildCommand); const Dockerfile: Array = []; Dockerfile.push(`FROM ${imageForBuild}`); diff --git a/apps/api/src/lib/buildPacks/docker.ts b/apps/api/src/lib/buildPacks/docker.ts index 04041b190..c017b4bed 100644 --- a/apps/api/src/lib/buildPacks/docker.ts +++ b/apps/api/src/lib/buildPacks/docker.ts @@ -28,6 +28,7 @@ export default async function (data) { if (secrets.length > 0) { secrets.forEach((secret) => { if (secret.isBuildSecret) { + // TODO: fix secrets if ( (pullmergeRequestId && secret.isPRMRSecret) || (!pullmergeRequestId && !secret.isPRMRSecret) diff --git a/apps/api/src/lib/buildPacks/node.ts b/apps/api/src/lib/buildPacks/node.ts index 546942542..ab064ae87 100644 --- a/apps/api/src/lib/buildPacks/node.ts +++ b/apps/api/src/lib/buildPacks/node.ts @@ -22,6 +22,7 @@ const createDockerfile = async (data, image): Promise => { if (secrets.length > 0) { secrets.forEach((secret) => { if (secret.isBuildSecret) { + console.log(secret) if (pullmergeRequestId) { const isSecretFound = secrets.filter(s => s.name === secret.name && s.isPRMRSecret) if (isSecretFound.length > 0) { From 39e24bdc9703cab1ed10986ab79fc9ba4999d592 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 10 Sep 2022 07:17:20 +0000 Subject: [PATCH 3/8] remove console logs --- apps/api/src/lib/buildPacks/node.ts | 1 - apps/ui/src/routes/applications/[id]/index.svelte | 1 - 2 files changed, 2 deletions(-) diff --git a/apps/api/src/lib/buildPacks/node.ts b/apps/api/src/lib/buildPacks/node.ts index ab064ae87..546942542 100644 --- a/apps/api/src/lib/buildPacks/node.ts +++ b/apps/api/src/lib/buildPacks/node.ts @@ -22,7 +22,6 @@ const createDockerfile = async (data, image): Promise => { if (secrets.length > 0) { secrets.forEach((secret) => { if (secret.isBuildSecret) { - console.log(secret) if (pullmergeRequestId) { const isSecretFound = secrets.filter(s => s.name === secret.name && s.isPRMRSecret) if (isSecretFound.length > 0) { diff --git a/apps/ui/src/routes/applications/[id]/index.svelte b/apps/ui/src/routes/applications/[id]/index.svelte index ec6a15318..ed5a70f4d 100644 --- a/apps/ui/src/routes/applications/[id]/index.svelte +++ b/apps/ui/src/routes/applications/[id]/index.svelte @@ -220,7 +220,6 @@ loading = true; try { nonWWWDomain = application.fqdn && getDomain(application.fqdn).replace(/^www\./, ''); - console.log({debug: nonWWWDomain}) if (application.deploymentType) application.deploymentType = application.deploymentType.toLowerCase(); !isBot && From 21b499065243710999305f1fb9387b943b857173 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 10 Sep 2022 07:29:51 +0000 Subject: [PATCH 4/8] ui: fix follow button --- apps/ui/src/routes/databases/[id]/logs/index.svelte | 2 +- apps/ui/src/routes/services/[id]/logs/index.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ui/src/routes/databases/[id]/logs/index.svelte b/apps/ui/src/routes/databases/[id]/logs/index.svelte index ee5df54ed..0a296487f 100644 --- a/apps/ui/src/routes/databases/[id]/logs/index.svelte +++ b/apps/ui/src/routes/databases/[id]/logs/index.svelte @@ -112,7 +112,7 @@