diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 0490bce4a..21185a6d4 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -186,7 +186,6 @@ async function getIPAddress() { } catch (error) { } } async function initServer() { - await asyncExecShell(`env | grep '^COOLIFY' > /app/.env`); try { console.log(`Initializing server...`); await asyncExecShell(`docker network create --attachable coolify`); @@ -246,6 +245,7 @@ async function autoUpdater() { const { isAutoUpdateEnabled } = await prisma.setting.findFirst(); if (isAutoUpdateEnabled) { await asyncExecShell(`docker pull coollabsio/coolify:${latestVersion}`); + await asyncExecShell(`env | grep '^COOLIFY' > .env`); await asyncExecShell( `sed -i '/COOLIFY_AUTO_UPDATE=/cCOOLIFY_AUTO_UPDATE=${isAutoUpdateEnabled}' .env` ); @@ -263,19 +263,20 @@ async function autoUpdater() { async function checkFluentBit() { try { - if (!isDev || process.env.COOLIFY_CONTAINER_DEV === 'true') { + if (!isDev) { const engine = '/var/run/docker.sock'; const { id } = await prisma.destinationDocker.findFirst({ where: { engine, network: 'coolify' } }); - const { found } = await checkContainer({ dockerId: id, container: 'coolify-fluentbit' }); + const { found } = await checkContainer({ dockerId: id, container: 'coolify-fluentbit', remove: true }); if (!found) { + await asyncExecShell(`env | grep '^COOLIFY' > .env`); await asyncExecShell(`docker compose up -d fluent-bit`); } } } catch (error) { console.log(error) - } + } } async function checkProxies() { try { diff --git a/apps/api/src/lib/buildPacks/compose.ts b/apps/api/src/lib/buildPacks/compose.ts index 11be25d13..67f971304 100644 --- a/apps/api/src/lib/buildPacks/compose.ts +++ b/apps/api/src/lib/buildPacks/compose.ts @@ -63,8 +63,6 @@ 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/api/src/routes/api/v1/handlers.ts b/apps/api/src/routes/api/v1/handlers.ts index d16d3ed24..f05b8acb9 100644 --- a/apps/api/src/routes/api/v1/handlers.ts +++ b/apps/api/src/routes/api/v1/handlers.ts @@ -146,7 +146,7 @@ export async function showDashboard(request: FastifyRequest) { let foundUnconfiguredApplication = false; for (const application of applications) { - if (!application.buildPack || !application.destinationDockerId || !application.branch || (!application.settings?.isBot && !application?.fqdn)) { + if (!application.buildPack || !application.destinationDockerId || !application.branch || (!application.settings?.isBot && !application?.fqdn) && application.buildPack !== "compose") { foundUnconfiguredApplication = true } } diff --git a/apps/ui/src/lib/components/Explainer.svelte b/apps/ui/src/lib/components/Explainer.svelte index f504798e1..43986a39d 100644 --- a/apps/ui/src/lib/components/Explainer.svelte +++ b/apps/ui/src/lib/components/Explainer.svelte @@ -12,6 +12,7 @@
+ diff --git a/apps/ui/src/lib/components/svg/applications/ApplicationIcons.svelte b/apps/ui/src/lib/components/svg/applications/ApplicationIcons.svelte index 0980063c6..fc5dbe16c 100644 --- a/apps/ui/src/lib/components/svg/applications/ApplicationIcons.svelte +++ b/apps/ui/src/lib/components/svg/applications/ApplicationIcons.svelte @@ -40,4 +40,6 @@ {:else if application.buildPack?.toLowerCase() === 'heroku'} +{:else if application.buildPack?.toLowerCase() === 'compose'} + {/if} diff --git a/apps/ui/src/lib/components/svg/applications/Compose.svelte b/apps/ui/src/lib/components/svg/applications/Compose.svelte new file mode 100644 index 000000000..86b9d622a --- /dev/null +++ b/apps/ui/src/lib/components/svg/applications/Compose.svelte @@ -0,0 +1,9 @@ + + +docker compose logo diff --git a/apps/ui/src/lib/components/svg/applications/index.ts b/apps/ui/src/lib/components/svg/applications/index.ts index ee2236357..7bbe7b55b 100644 --- a/apps/ui/src/lib/components/svg/applications/index.ts +++ b/apps/ui/src/lib/components/svg/applications/index.ts @@ -17,3 +17,4 @@ export { default as Eleventy } from './Eleventy.svelte'; export { default as Deno } from './Deno.svelte'; export { default as Laravel } from './Laravel.svelte'; export { default as Heroku } from './Heroku.svelte'; +export { default as Compose } from './Compose.svelte'; diff --git a/apps/ui/src/routes/applications/[id]/__layout.svelte b/apps/ui/src/routes/applications/[id]/__layout.svelte index fce55a758..e06b34a14 100644 --- a/apps/ui/src/routes/applications/[id]/__layout.svelte +++ b/apps/ui/src/routes/applications/[id]/__layout.svelte @@ -227,7 +227,7 @@
Configurations
+ Application Error Application exited with an error! {/if} {#if $status.application.initialLoading} - {:else if $status.application.overallStatus === 'healthy'} - Stop - - - Restart (useful to change secrets) - - - Force Redeploy (without cache) + + + {#if application.buildPack !== 'compose'} + + {/if} {:else if $isDeploymentEnabled && !$page.url.pathname.startsWith(`/applications/${id}/configuration/`)}