Cleanup coolify image fix
This commit is contained in:
parent
3d27fd04ba
commit
ebde77008c
@ -6,10 +6,14 @@ export default async function () {
|
|||||||
const destinationDockers = await prisma.destinationDocker.findMany();
|
const destinationDockers = await prisma.destinationDocker.findMany();
|
||||||
for (const destinationDocker of destinationDockers) {
|
for (const destinationDocker of destinationDockers) {
|
||||||
const host = getEngine(destinationDocker.engine);
|
const host = getEngine(destinationDocker.engine);
|
||||||
|
// Cleanup old coolify images
|
||||||
try {
|
try {
|
||||||
await asyncExecShell(
|
const { stdout: images } = await asyncExecShell(
|
||||||
`DOCKER_HOST=${host} docker rmi $(docker images coollabsio/coolify --filter before="coollabsio/coolify:latest" -q)`
|
`DOCKER_HOST=${host} docker images coollabsio/coolify --filter before="coollabsio/coolify:latest" -q`
|
||||||
);
|
);
|
||||||
|
if (images) {
|
||||||
|
await asyncExecShell(`DOCKER_HOST=${host} docker rmi ${images}`);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ const cron = async () => {
|
|||||||
|
|
||||||
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
|
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
|
||||||
await queue.ssl.add('ssl', {}, { repeat: { every: 60000 } });
|
await queue.ssl.add('ssl', {}, { repeat: { every: 60000 } });
|
||||||
await queue.cleanup.add('cleanup', {}, { repeat: { every: 600000 } });
|
await queue.cleanup.add('cleanup', {}, { repeat: { every: 300000 } });
|
||||||
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
|
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
|
||||||
|
|
||||||
const events = {
|
const events = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user