mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: rename action, move pull to updateServer
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
|||||||
stopService,
|
stopService,
|
||||||
stopServiceRemote,
|
stopServiceRemote,
|
||||||
updateAdmin,
|
updateAdmin,
|
||||||
|
checkIsUpdateAvailable,
|
||||||
updateLetsEncryptEmail,
|
updateLetsEncryptEmail,
|
||||||
updateServerById,
|
updateServerById,
|
||||||
updateServerTraefik,
|
updateServerTraefik,
|
||||||
@@ -342,17 +343,20 @@ export const settingsRouter = createTRPCRouter({
|
|||||||
writeConfig("middlewares", input.traefikConfig);
|
writeConfig("middlewares", input.traefikConfig);
|
||||||
return true;
|
return true;
|
||||||
}),
|
}),
|
||||||
|
checkForUpdate: adminProcedure.mutation(async () => {
|
||||||
checkAndUpdateImage: adminProcedure.mutation(async () => {
|
|
||||||
if (IS_CLOUD) {
|
if (IS_CLOUD) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return await pullLatestRelease();
|
|
||||||
|
return await checkIsUpdateAvailable();
|
||||||
}),
|
}),
|
||||||
updateServer: adminProcedure.mutation(async () => {
|
updateServer: adminProcedure.mutation(async () => {
|
||||||
if (IS_CLOUD) {
|
if (IS_CLOUD) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await pullLatestRelease();
|
||||||
|
|
||||||
await spawnAsync("docker", [
|
await spawnAsync("docker", [
|
||||||
"service",
|
"service",
|
||||||
"update",
|
"update",
|
||||||
@@ -361,6 +365,7 @@ export const settingsRouter = createTRPCRouter({
|
|||||||
getDokployImage(),
|
getDokployImage(),
|
||||||
"dokploy",
|
"dokploy",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user