From 27199742625d90619ba4ab38c154baef035c93cc Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 31 May 2022 22:41:33 +0200 Subject: [PATCH 1/4] chore: Version++ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b8705044..a5d41d606 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.9.3", + "version": "2.9.4", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0", From d67a3f51ece908bef950dd8288ef2c42d076257a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 31 May 2022 23:09:55 +0200 Subject: [PATCH 2/4] fix: Demo version forms --- src/routes/applications/[id]/index.svelte | 2 +- .../services/[id]/_Services/_Services.svelte | 20 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/routes/applications/[id]/index.svelte b/src/routes/applications/[id]/index.svelte index 78fa72dff..a00f08d2f 100644 --- a/src/routes/applications/[id]/index.svelte +++ b/src/routes/applications/[id]/index.svelte @@ -102,7 +102,7 @@ onMount(async () => { if (browser && window.location.hostname === 'demo.coolify.io' && !application.fqdn) { application.fqdn = `http://${cuid()}.demo.coolify.io`; - await post(`/applications/${id}.json`, { ...application }); + await handleSubmit(); } domainEl.focus(); await getUsage(); diff --git a/src/routes/services/[id]/_Services/_Services.svelte b/src/routes/services/[id]/_Services/_Services.svelte index 062292c4d..95e0f914d 100644 --- a/src/routes/services/[id]/_Services/_Services.svelte +++ b/src/routes/services/[id]/_Services/_Services.svelte @@ -72,9 +72,25 @@ } } onMount(async () => { - if (browser && window.location.hostname === 'demo.coolify.io' && !service.fqdn) { + if (browser && window.location.hostname === 'localhost' && !service.fqdn) { service.fqdn = `http://${cuid()}.demo.coolify.io`; - await post(`/services/${id}/${service.type}.json`, { ...service }); + if (service.type === 'wordpress') { + service.wordpress.mysqlDatabase = 'db'; + } + if (service.type === 'plausibleanalytics') { + service.plausibleAnalytics.email = 'noreply@demo.com'; + service.plausibleAnalytics.username = 'admin'; + } + if (service.type === 'minio') { + service.minio.apiFqdn = `http://${cuid()}.demo.coolify.io`; + } + if (service.type === 'ghost') { + service.ghost.mariadbDatabase = 'db'; + } + if (service.type === 'fider') { + service.fider.emailNoreply = 'noreply@demo.com'; + } + await handleSubmit(); } }); From 2c33447f9f9684893fa50a4aa22e221066b545ba Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 31 May 2022 23:23:39 +0200 Subject: [PATCH 3/4] fix: typo --- src/routes/services/[id]/_Services/_Services.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/services/[id]/_Services/_Services.svelte b/src/routes/services/[id]/_Services/_Services.svelte index 95e0f914d..60371725f 100644 --- a/src/routes/services/[id]/_Services/_Services.svelte +++ b/src/routes/services/[id]/_Services/_Services.svelte @@ -72,7 +72,7 @@ } } onMount(async () => { - if (browser && window.location.hostname === 'localhost' && !service.fqdn) { + if (browser && window.location.hostname === 'demo.coolify.io' && !service.fqdn) { service.fqdn = `http://${cuid()}.demo.coolify.io`; if (service.type === 'wordpress') { service.wordpress.mysqlDatabase = 'db'; From a50f7a7cc2cac43b72e59e9aa65ed6d7f9fc6fa5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 1 Jun 2022 10:42:17 +0200 Subject: [PATCH 4/4] fix: Revert gh and gl cloning --- src/lib/importers/github.ts | 2 +- src/lib/importers/gitlab.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/importers/github.ts b/src/lib/importers/github.ts index 8cf4bf047..a08fb87b4 100644 --- a/src/lib/importers/github.ts +++ b/src/lib/importers/github.ts @@ -49,7 +49,7 @@ export default async function ({ applicationId }); await asyncExecShell( - `GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git clone --recursive --jobs 3 -q -b ${branch} https://x-access-token:${token}@${url}/${repository}.git ${workdir}/ && cd ${workdir} && GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git lfs pull && cd .. ` + `git clone -q -b ${branch} https://x-access-token:${token}@${url}/${repository}.git ${workdir}/ && cd ${workdir} && git submodule update --init --recursive && git lfs pull && cd .. ` ); const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`); return commit.replace('\n', ''); diff --git a/src/lib/importers/gitlab.ts b/src/lib/importers/gitlab.ts index 9eccad5ab..966b22c96 100644 --- a/src/lib/importers/gitlab.ts +++ b/src/lib/importers/gitlab.ts @@ -31,7 +31,7 @@ export default async function ({ }); await asyncExecShell( - `GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git clone --recursive --jobs 3 -q -b ${branch} git@${url}:${repository}.git --config core.sshCommand="ssh -q -i ${repodir}id.rsa -o StrictHostKeyChecking=no" ${workdir}/ && cd ${workdir}/ && GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git lfs pull && cd .. ` + `git clone -q -b ${branch} git@${url}:${repository}.git --config core.sshCommand="ssh -q -i ${repodir}id.rsa -o StrictHostKeyChecking=no" ${workdir}/ && cd ${workdir}/ && git submodule update --init --recursive && git lfs pull && cd .. ` ); const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`); return commit.replace('\n', '');