WIP: Traefik?!

This commit is contained in:
Andras Bacsai
2022-05-12 13:02:14 +02:00
parent 60a428a952
commit 6bba37c36d
7 changed files with 216 additions and 2 deletions
+16
View File
@@ -61,6 +61,22 @@ export const post: RequestHandler = async (event) => {
} catch (error) {
return ErrorHandler(error);
}
} else if (type === 'migrateToTraefik') {
try {
const settings = await db.prisma.setting.findFirst({});
await db.prisma.setting.update({
where: { id: settings.id },
data: { disableHaproxy: true }
});
await asyncExecShell(`docker stop -t 0 coolify-haproxy`);
await asyncExecShell(`docker rm coolify-haproxy`);
return {
status: 200,
body: {}
};
} catch (error) {
return ErrorHandler(error);
}
}
return {
status: 500