diff --git a/apps/api/src/lib/docker.ts b/apps/api/src/lib/docker.ts
index dff59b7db..a4d36b7fc 100644
--- a/apps/api/src/lib/docker.ts
+++ b/apps/api/src/lib/docker.ts
@@ -87,6 +87,9 @@ export async function removeContainer({
await executeDockerCmd({ dockerId, command: `docker stop -t 0 ${id}` })
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
}
+ if (JSON.parse(stdout).Status === 'exited') {
+ await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
+ }
} catch (error) {
throw error;
}
diff --git a/apps/ui/src/routes/applications/[id]/__layout.svelte b/apps/ui/src/routes/applications/[id]/__layout.svelte
index 64f8a4ea6..dc51e0185 100644
--- a/apps/ui/src/routes/applications/[id]/__layout.svelte
+++ b/apps/ui/src/routes/applications/[id]/__layout.svelte
@@ -272,14 +272,13 @@
>
{#if $status.application.overallStatus === 'degraded' && application.buildPack !== 'compose'}
- Application exited with an error!
{/if}
{#if $status.application.initialLoading}
{:else if $status.application.overallStatus === 'healthy'}
-
- {#if application.buildPack !== 'compose'}
-
-{/if}
+
+ {#if application.buildPack !== 'compose'}
+
+ {/if}