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) { export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
// Cleanup old coolify images // Cleanup old coolify images
try { 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(); images = images.trim();
if (images) { 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) { } catch (error) {
//console.log(error); //console.log(error);

View File

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

View File

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