fix restart

This commit is contained in:
Andras Bacsai 2022-09-05 13:09:59 +02:00
parent a18c73bd7c
commit 6ca1d978d4
3 changed files with 4 additions and 3 deletions

View File

@ -1446,11 +1446,11 @@ export function convertTolOldVolumeNames(type) {
export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
// Cleanup old coolify images
try {
let { stdout: images } = await executeDockerCmd({ dockerId, command: `docker images coollabsio/coolify --filter before="coollabsio/coolify:${version}" -q | xargs` })
let { stdout: images } = await executeDockerCmd({ dockerId, command: `docker images coollabsio/coolify --filter before="coollabsio/coolify:${version}" -q | xargs -r` })
images = images.trim();
if (images) {
await executeDockerCmd({ dockerId, command: `docker rmi -f ${images}" -q | xargs` })
await executeDockerCmd({ dockerId, command: `docker rmi -f ${images}" -q | xargs -r` })
}
} catch (error) {
//console.log(error);

View File

@ -78,7 +78,7 @@ export async function restartCoolify(request: FastifyRequest<any>) {
const teamId = request.user.teamId;
if (teamId === '0') {
if (!isDev) {
await asyncExecShell(`docker restart coolify`);
asyncExecShell(`docker restart coolify`);
return {};
} else {
console.log('Restarting Coolify')

View File

@ -42,6 +42,7 @@
loading.restart = true;
try {
await post(`/internal/restart`, {});
await asyncSleep(10000);
let reachable = false;
let tries = 0;
do {