feat: Coolify auto-updater

This commit is contained in:
Andras Bacsai
2022-04-25 09:54:28 +02:00
parent 8290ee856f
commit 11d74c0c1f
9 changed files with 118 additions and 9 deletions

View File

@@ -50,6 +50,20 @@ async function main() {
}
});
}
// Set auto-update based on env variable
const isAutoUpdateEnabled = process.env['COOLIFY_AUTO_UPDATE'] === 'true';
const settings = await prisma.setting.findFirst({});
if (settings) {
await prisma.setting.update({
where: {
id: settings.id
},
data: {
isAutoUpdateEnabled
}
});
}
}
main()
.catch((e) => {