mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove console log
This commit is contained in:
@@ -46,9 +46,7 @@ export const getContainers = async () => {
|
|||||||
.filter((container) => !container.name.includes("dokploy"));
|
.filter((container) => !container.name.includes("dokploy"));
|
||||||
|
|
||||||
return containers;
|
return containers;
|
||||||
} catch (error) {
|
} catch (error) {}
|
||||||
console.error(`Execution error: ${error}`);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getConfig = async (containerId: string) => {
|
export const getConfig = async (containerId: string) => {
|
||||||
@@ -65,9 +63,7 @@ export const getConfig = async (containerId: string) => {
|
|||||||
const config = JSON.parse(stdout);
|
const config = JSON.parse(stdout);
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
} catch (error) {
|
} catch (error) {}
|
||||||
console.error(`Execution error: ${error}`);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getContainersByAppNameMatch = async (appName: string) => {
|
export const getContainersByAppNameMatch = async (appName: string) => {
|
||||||
@@ -103,9 +99,7 @@ export const getContainersByAppNameMatch = async (appName: string) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return containers || [];
|
return containers || [];
|
||||||
} catch (error) {
|
} catch (error) {}
|
||||||
console.error(`Execution error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
@@ -144,9 +138,7 @@ export const getContainersByAppLabel = async (appName: string) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return containers || [];
|
return containers || [];
|
||||||
} catch (error) {
|
} catch (error) {}
|
||||||
console.error(`Execution error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -121,12 +121,3 @@ export const validUniqueServerAppName = async (appName: string) => {
|
|||||||
|
|
||||||
return nonEmptyProjects.length === 0;
|
return nonEmptyProjects.length === 0;
|
||||||
};
|
};
|
||||||
export const slugifyProjectName = (projectName: string): string => {
|
|
||||||
return projectName
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/[0-9]/g, "")
|
|
||||||
.replace(/[^a-z\s-]/g, "")
|
|
||||||
.replace(/\s+/g, "-")
|
|
||||||
.replace(/-+/g, "-")
|
|
||||||
.replace(/^-+|-+$/g, "");
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ export const mechanizeDockerContainer = async (
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
await docker.createService(settings);
|
await docker.createService(settings);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user