diff --git a/apps/api/src/lib/buildPacks/compose.ts b/apps/api/src/lib/buildPacks/compose.ts index 71cb72b21..11be25d13 100644 --- a/apps/api/src/lib/buildPacks/compose.ts +++ b/apps/api/src/lib/buildPacks/compose.ts @@ -2,7 +2,6 @@ import { promises as fs } from 'fs'; import { defaultComposeConfiguration, executeDockerCmd } from '../common'; import { buildImage, saveBuildLog } from './common'; import yaml from 'js-yaml'; -import { getSecrets } from '../../routes/api/v1/applications/handlers'; export default async function (data) { let { @@ -41,20 +40,18 @@ export default async function (data) { const envs = [ `PORT=${port}` ]; - if (getSecrets.length > 0) { + if (secrets.length > 0) { secrets.forEach((secret) => { - if (secret.isBuildSecret) { - if (pullmergeRequestId) { - const isSecretFound = secrets.filter(s => s.name === secret.name && s.isPRMRSecret) - if (isSecretFound.length > 0) { - envs.push(`${secret.name}=${isSecretFound[0].value}`); - } else { - envs.push(`${secret.name}=${secret.value}`); - } + if (pullmergeRequestId) { + const isSecretFound = secrets.filter(s => s.name === secret.name && s.isPRMRSecret) + if (isSecretFound.length > 0) { + envs.push(`${secret.name}=${isSecretFound[0].value}`); } else { - if (!secret.isPRMRSecret) { - envs.push(`${secret.name}=${secret.value}`); - } + envs.push(`${secret.name}=${secret.value}`); + } + } else { + if (!secret.isPRMRSecret) { + envs.push(`${secret.name}=${secret.value}`); } } }); @@ -66,6 +63,8 @@ export default async function (data) { } catch (error) { // } + console.log('envFound', envFound) + console.log(envs) const composeVolumes = volumes.map((volume) => { return { [`${volume.split(':')[0]}`]: { diff --git a/apps/ui/src/routes/applications/[id]/index.svelte b/apps/ui/src/routes/applications/[id]/index.svelte index 11f59dc4d..fe6c07e1f 100644 --- a/apps/ui/src/routes/applications/[id]/index.svelte +++ b/apps/ui/src/routes/applications/[id]/index.svelte @@ -49,6 +49,7 @@ import Setting from '$lib/components/Setting.svelte'; import Explainer from '$lib/components/Explainer.svelte'; import { goto } from '$app/navigation'; + import Beta from '$lib/components/Beta.svelte'; const { id } = $page.params; @@ -257,10 +258,11 @@ forceSave = false; - toast && addToast({ - message: 'Configuration saved.', - type: 'success' - }); + toast && + addToast({ + message: 'Configuration saved.', + type: 'success' + }); if (application.fqdn && application.fqdn.startsWith('https')) { isHttps = true; } else { @@ -436,7 +438,7 @@ {/if}
- + {#if isDisabled} {:else} @@ -910,7 +912,7 @@
{:else}
- Docker Compose + Stack {#if $appSession.isAdmin}