fix: cleanup coolify images

This commit is contained in:
Andras Bacsai 2022-03-02 20:57:28 +01:00
parent 0926d40247
commit 6655fb182c
2 changed files with 3 additions and 2 deletions

View File

@ -8,9 +8,10 @@ export default async function () {
const host = getEngine(destinationDocker.engine);
// Cleanup old coolify images
try {
const { stdout: images } = await asyncExecShell(
let { stdout: images } = await asyncExecShell(
`DOCKER_HOST=${host} docker images coollabsio/coolify --filter before="coollabsio/coolify:latest" -q | xargs `
);
images = images.trim();
if (images) {
await asyncExecShell(`DOCKER_HOST=${host} docker rmi ${images}`);
}

View File

@ -87,7 +87,7 @@ const cron = async () => {
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
await queue.ssl.add('ssl', {}, { repeat: { every: dev ? 10000 : 60000 } });
await queue.cleanup.add('cleanup', {}, { repeat: { every: 300000 } });
await queue.cleanup.add('cleanup', {}, { repeat: { every: dev ? 10000 : 300000 } });
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
const events = {