Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

cleanup logs

Andras Bacsai936baf676e86
diff --git a/apps/api/src/jobs/deployApplication.ts b/apps/api/src/jobs/deployApplication.ts
index dc3b0d41df..7ec322f63f 100644
--- a/apps/api/src/jobs/deployApplication.ts
+++ b/apps/api/src/jobs/deployApplication.ts
@@ -177,9 +177,7 @@ import * as buildpacks from '../lib/buildPacks';
try {
await prisma.build.update({ where: { id: buildId }, data: { commit } });
- } catch (err) {
- console.log(err);
- }
+ } catch (err) { }
if (!pullmergeRequestId) {
if (configHash !== currentHash) {
diff --git a/apps/api/src/jobs/infrastructure.ts b/apps/api/src/jobs/infrastructure.ts
index 97369fb3ab..fbcb07616e 100644
--- a/apps/api/src/jobs/infrastructure.ts
+++ b/apps/api/src/jobs/infrastructure.ts
@@ -21,7 +21,6 @@ async function autoUpdater() {
const activeCount = 0
if (activeCount === 0) {
if (!isDev) {
- console.log(`Updating Coolify to ${latestVersion}.`);
await asyncExecShell(`docker pull coollabsio/coolify:${latestVersion}`);
await asyncExecShell(`env | grep COOLIFY > .env`);
await asyncExecShell(
@@ -35,9 +34,7 @@ async function autoUpdater() {
}
}
}
- } catch (error) {
- console.log(error);
- }
+ } catch (error) { }
}
async function checkProxies() {
try {
@@ -71,9 +68,7 @@ async function checkProxies() {
}
try {
await createRemoteEngineConfiguration(docker.id)
- } catch (error) {
- console.log({ error })
- }
+ } catch (error) { }
}
}
// TCP Proxies
@@ -132,9 +127,7 @@ async function cleanupPrismaEngines() {
if (stdout.trim() != null && stdout.trim() != '' && Number(stdout.trim()) > 1) {
await asyncExecShell(`killall -q -e /app/prisma-engines/query-engine -o 1m`)
}
- } catch (error) {
- console.log(error);
- }
+ } catch (error) { }
}
}
async function cleanupStorage() {
@@ -185,9 +178,7 @@ async function cleanupStorage() {
lowDiskSpace = true;
}
}
- } catch (error) {
- console.log(error);
- }
+ } catch (error) { }
await cleanupDockerStorage(destination.id, lowDiskSpace, false)
}
}
diff --git a/apps/api/src/lib/buildPacks/common.ts b/apps/api/src/lib/buildPacks/common.ts
index 97bfb6fb98..b6e57f52c8 100644
--- a/apps/api/src/lib/buildPacks/common.ts
+++ b/apps/api/src/lib/buildPacks/common.ts
@@ -512,7 +512,6 @@ export async function copyBaseConfigurationFiles(
);
}
} catch (error) {
- console.log(error);
throw new Error(error);
}
}
diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts
index a98728cef1..90b35cd128 100644
--- a/apps/api/src/lib/common.ts
+++ b/apps/api/src/lib/common.ts
@@ -471,9 +471,7 @@ export async function createRemoteEngineConfiguration(id: string) {
if (numberOfSSHTunnelsRunning !== '' && Number(numberOfSSHTunnelsRunning.trim()) == 0) {
try {
await asyncExecShell(`SSH_AUTH_SOCK=/tmp/coolify-ssh-agent.pid ssh -F /dev/null -o "StrictHostKeyChecking no" -fNL ${localPort}:localhost:${remotePort} ${remoteUser}@${remoteIpAddress}`)
- } catch (error) {
- console.log(error)
- }
+ } catch (error) { }
}
const config = sshConfig.parse('')
@@ -1250,7 +1248,6 @@ export async function startTraefikTCPProxy(
})
}
} catch (error) {
- console.log(error);
return error;
}
}
@@ -1444,9 +1441,7 @@ export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
if (images) {
await executeDockerCmd({ dockerId, command: `docker rmi -f ${images}" -q | xargs -r` })
}
- } catch (error) {
- //console.log(error);
- }
+ } catch (error) { }
if (lowDiskSpace || force) {
if (isDev) {
if (!force) console.log(`[DEV MODE] Low disk space: ${lowDiskSpace}`);
@@ -1454,25 +1449,17 @@ export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
}
try {
await executeDockerCmd({ dockerId, command: `docker container prune -f --filter "label=coolify.managed=true"` })
- } catch (error) {
- //console.log(error);
- }
+ } catch (error) { }
try {
await executeDockerCmd({ dockerId, command: `docker image prune -f` })
- } catch (error) {
- //console.log(error);
- }
+ } catch (error) { }
try {
await executeDockerCmd({ dockerId, command: `docker image prune -a -f` })
- } catch (error) {
- //console.log(error);
- }
+ } catch (error) { }
// Cleanup build caches
try {
await executeDockerCmd({ dockerId, command: `docker builder prune -a -f` })
- } catch (error) {
- //console.log(error);
- }
+ } catch (error) { }
}
}
diff --git a/apps/api/src/lib/docker.ts b/apps/api/src/lib/docker.ts
index c1ae977e50..f0b13d5f1a 100644
--- a/apps/api/src/lib/docker.ts
+++ b/apps/api/src/lib/docker.ts
@@ -76,7 +76,6 @@ export async function removeContainer({
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
}
} catch (error) {
- console.log(error);
throw error;
}
}
diff --git a/apps/api/src/plugins/jwt.ts b/apps/api/src/plugins/jwt.ts
index 54dd1b72d7..029aecd94d 100644
--- a/apps/api/src/plugins/jwt.ts
+++ b/apps/api/src/plugins/jwt.ts
@@ -21,7 +21,6 @@ export default fp<FastifyJWTOptions>(async (fastify, opts) => {
try {
await request.jwtVerify()
} catch (err) {
- console.log(err)
reply.send(err)
}
})
diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts
index e7bdf88887..e375903818 100644
--- a/apps/api/src/routes/api/v1/applications/handlers.ts
+++ b/apps/api/src/routes/api/v1/applications/handlers.ts
@@ -767,7 +767,6 @@ export async function saveConnectedDatabase(request, reply) {
try {
const { id } = request.params
const { databaseId, type } = request.body
- console.log({ databaseId, type })
await prisma.application.update({ where: { id }, data: { connectedDatabase: { upsert: { create: { database: { connect: { id: databaseId } }, hostedDatabaseType: type }, update: { database: { connect: { id: databaseId } }, hostedDatabaseType: type } } } } })
return reply.code(201).send()
} catch ({ status, message }) {
@@ -930,7 +929,6 @@ export async function getPreviews(request: FastifyRequest<OnlyId>) {
})
}
} catch ({ status, message }) {
- console.log({ status, message })
return errorHandler({ status, message })
}
}
diff --git a/apps/api/src/routes/api/v1/databases/handlers.ts b/apps/api/src/routes/api/v1/databases/handlers.ts
index e918c21fc4..d646a036fc 100644
--- a/apps/api/src/routes/api/v1/databases/handlers.ts
+++ b/apps/api/src/routes/api/v1/databases/handlers.ts
@@ -280,15 +280,12 @@ export async function startDatabase(request: FastifyRequest<OnlyId>) {
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
try {
await executeDockerCmd({ dockerId: destinationDocker.id, command: `docker volume create ${volumeName}` })
- } catch (error) {
- console.log(error);
- }
+ } catch (error) { }
try {
await executeDockerCmd({ dockerId: destinationDocker.id, command: `docker compose -f ${composeFileDestination} up -d` })
if (isPublic) await startTraefikTCPProxy(destinationDocker, id, publicPort, privatePort);
return {};
} catch (error) {
- console.log(error)
throw {
error
};
diff --git a/apps/api/src/routes/api/v1/destinations/handlers.ts b/apps/api/src/routes/api/v1/destinations/handlers.ts
index 1c8831d25f..bb96981cf4 100644
--- a/apps/api/src/routes/api/v1/destinations/handlers.ts
+++ b/apps/api/src/routes/api/v1/destinations/handlers.ts
@@ -30,7 +30,6 @@ export async function listDestinations(request: FastifyRequest<ListDestinations>
destinations
}
} catch ({ status, message }) {
- console.log({ status, message })
return errorHandler({ status, message })
}
}
@@ -114,7 +113,6 @@ export async function newDestination(request: FastifyRequest<NewDestination>, re
}
} catch ({ status, message }) {
- console.log({ status, message })
return errorHandler({ status, message })
}
}
@@ -162,7 +160,6 @@ export async function startProxy(request: FastifyRequest<Proxy>) {
await startTraefikProxy(id);
return {}
} catch ({ status, message }) {
- console.log({ status, message })
await stopTraefikProxy(id);
return errorHandler({ status, message })
}
diff --git a/apps/api/src/routes/api/v1/handlers.ts b/apps/api/src/routes/api/v1/handlers.ts
index 2a03859a3e..702ad31a83 100644
--- a/apps/api/src/routes/api/v1/handlers.ts
+++ b/apps/api/src/routes/api/v1/handlers.ts
@@ -65,7 +65,6 @@ export async function update(request: FastifyRequest<Update>) {
);
return {};
} else {
- console.log(latestVersion);
await asyncSleep(2000);
return {};
}
@@ -81,7 +80,6 @@ export async function restartCoolify(request: FastifyRequest<any>) {
asyncExecShell(`docker restart coolify`);
return {};
} else {
- console.log('Restarting Coolify')
return {};
}
}
diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.ts
index 16f4fb006f..c6858a7d78 100644
--- a/apps/api/src/routes/api/v1/services/handlers.ts
+++ b/apps/api/src/routes/api/v1/services/handlers.ts
@@ -560,10 +560,7 @@ export async function activateWordpressFtp(request: FastifyRequest<ActivateWordp
command: `docker stop -t 0 ${id}-ftp && docker rm ${id}-ftp`
})
}
- } catch (error) {
- console.log(error);
- //
- }
+ } catch (error) { }
const volumes = [
`${id}-wordpress-data:/home/${ftpUser}/wordpress`,
`${isDev ? hostkeyDir : '/var/lib/docker/volumes/coolify-ssl-certs/_data/hostkeys'
@@ -642,9 +639,7 @@ export async function activateWordpressFtp(request: FastifyRequest<ActivateWordp
await asyncExecShell(
`rm -fr ${hostkeyDir}/${id}-docker-compose.yml ${hostkeyDir}/${id}.ed25519 ${hostkeyDir}/${id}.ed25519.pub ${hostkeyDir}/${id}.rsa ${hostkeyDir}/${id}.rsa.pub ${hostkeyDir}/${id}.sh`
);
- } catch (error) {
- console.log(error)
- }
+ } catch (error) { }
}
diff --git a/apps/api/src/routes/webhooks/github/handlers.ts b/apps/api/src/routes/webhooks/github/handlers.ts
index fc9ca3f0d1..de288022d9 100644
--- a/apps/api/src/routes/webhooks/github/handlers.ts
+++ b/apps/api/src/routes/webhooks/github/handlers.ts
@@ -100,8 +100,7 @@ export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promi
const checksum = Buffer.from(githubSignature, 'utf8');
//@ts-ignore
if (checksum.length !== digest.length || !crypto.timingSafeEqual(digest, checksum)) {
- console.log('SHA256 checksum failed. Are you doing something fishy?')
- // throw { status: 500, message: 'SHA256 checksum failed. Are you doing something fishy?'
+ throw { status: 500, message: 'SHA256 checksum failed. Are you doing something fishy?' }
};
}
diff --git a/apps/ui/src/lib/components/UpdateAvailable.svelte b/apps/ui/src/lib/components/UpdateAvailable.svelte
index 4122aae3e4..db98d86992 100644
--- a/apps/ui/src/lib/components/UpdateAvailable.svelte
+++ b/apps/ui/src/lib/components/UpdateAvailable.svelte
@@ -16,7 +16,6 @@
updateStatus.loading = true;
try {
if (dev) {
- console.log(`updating to ${latestVersion}`);
await asyncSleep(4000);
return window.location.reload();
} else {
diff --git a/apps/ui/src/routes/applications/[id]/_Secret.svelte b/apps/ui/src/routes/applications/[id]/_Secret.svelte
index 780dea7261..d44c2396e8 100644
--- a/apps/ui/src/routes/applications/[id]/_Secret.svelte
+++ b/apps/ui/src/routes/applications/[id]/_Secret.svelte
@@ -65,7 +65,6 @@
}
dispatch('refresh');
} catch (error) {
- console.log(error);
return errorNotification(error);
}
}
diff --git a/apps/ui/src/routes/applications/[id]/index.svelte b/apps/ui/src/routes/applications/[id]/index.svelte
index a1bc39a8b8..f11286b98f 100644
--- a/apps/ui/src/routes/applications/[id]/index.svelte
+++ b/apps/ui/src/routes/applications/[id]/index.svelte
@@ -239,7 +239,6 @@
type: 'success'
});
} catch (error) {
- console.log(error);
//@ts-ignore
if (error?.message.startsWith($t('application.dns_not_set_partial_error'))) {
forceSave = true;
diff --git a/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte b/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
index 51034df07a..41354eefc0 100644
--- a/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
+++ b/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
@@ -67,7 +67,6 @@
}
}, 1000);
} catch (error) {
- console.log(error);
return errorNotification(error);
}
}
@@ -80,7 +79,6 @@
applicationId: id
});
} catch (error) {
- console.log(error);
return errorNotification(error);
}
}
diff --git a/apps/ui/src/routes/applications/[id]/logs/index.svelte b/apps/ui/src/routes/applications/[id]/logs/index.svelte
index 9b2f86a444..160787f1d2 100644
--- a/apps/ui/src/routes/applications/[id]/logs/index.svelte
+++ b/apps/ui/src/routes/applications/[id]/logs/index.svelte
@@ -39,7 +39,6 @@
logs = data.logs;
}
} catch (error) {
- console.log(error);
return errorNotification(error);
} finally {
logsLoading = false;
diff --git a/apps/ui/src/routes/databases/[id]/logs/index.svelte b/apps/ui/src/routes/databases/[id]/logs/index.svelte
index b47cd6ad39..ee5df54edf 100644
--- a/apps/ui/src/routes/databases/[id]/logs/index.svelte
+++ b/apps/ui/src/routes/databases/[id]/logs/index.svelte
@@ -45,7 +45,6 @@
logs = data.logs;
}
} catch (error) {
- console.log(error);
return errorNotification(error);
} finally {
loadingLogs = false;
diff --git a/apps/ui/src/routes/destinations/[id]/__layout.svelte b/apps/ui/src/routes/destinations/[id]/__layout.svelte
index 99001419f2..4be92c02fb 100644
--- a/apps/ui/src/routes/destinations/[id]/__layout.svelte
+++ b/apps/ui/src/routes/destinations/[id]/__layout.svelte
@@ -40,7 +40,6 @@
}
};
} catch (error) {
- console.log(error);
return handlerNotFoundLoad(error, url);
}
};
diff --git a/apps/ui/src/routes/services/[id]/__layout.svelte b/apps/ui/src/routes/services/[id]/__layout.svelte
index 0476c6b19c..558c2eca16 100644
--- a/apps/ui/src/routes/services/[id]/__layout.svelte
+++ b/apps/ui/src/routes/services/[id]/__layout.svelte
@@ -47,7 +47,6 @@
}
};
} catch (error) {
- console.log(error);
return handlerNotFoundLoad(error, url);
}
};
diff --git a/apps/ui/src/routes/services/[id]/logs/index.svelte b/apps/ui/src/routes/services/[id]/logs/index.svelte
index ba71cc3659..bb9c775c36 100644
--- a/apps/ui/src/routes/services/[id]/logs/index.svelte
+++ b/apps/ui/src/routes/services/[id]/logs/index.svelte
@@ -41,7 +41,6 @@
logs = data.logs;
}
} catch (error) {
- console.log(error);
return errorNotification(error);
} finally {
logsLoading = false;
diff --git a/apps/ui/src/routes/settings/global.svelte b/apps/ui/src/routes/settings/global.svelte
index 9b71109e67..219730d9aa 100644
--- a/apps/ui/src/routes/settings/global.svelte
+++ b/apps/ui/src/routes/settings/global.svelte
@@ -129,7 +129,6 @@
}
}
}
- console.log(error);
return errorNotification(error);
} finally {
loading.save = false;