mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-28 02:25:23 +02:00
feat(settings): add error handling for unsupported resource types in Traefik setup
- Introduced error handling for unsupported resource types in `readPorts` and `writeTraefikSetup` functions. - Enhanced `initializeStandaloneTraefik` to include image pulling with error logging for better debugging.
This commit is contained in:
@@ -87,16 +87,27 @@ export const initializeStandaloneTraefik = async ({
|
||||
};
|
||||
|
||||
const docker = await getRemoteDocker(serverId);
|
||||
try {
|
||||
await docker.pull(imageName);
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
console.log("Traefik Image Pulled ✅");
|
||||
} catch (error) {
|
||||
console.log("Traefik Image Not Found: Pulling ", error);
|
||||
}
|
||||
try {
|
||||
const container = docker.getContainer(containerName);
|
||||
await container.remove({ force: true });
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||
} catch {}
|
||||
|
||||
await docker.createContainer(settings);
|
||||
const newContainer = docker.getContainer(containerName);
|
||||
await newContainer.start();
|
||||
console.log("Traefik Started ✅");
|
||||
try {
|
||||
await docker.createContainer(settings);
|
||||
const newContainer = docker.getContainer(containerName);
|
||||
await newContainer.start();
|
||||
console.log("Traefik Started ✅");
|
||||
} catch (error) {
|
||||
console.log("Traefik Not Found: Starting ", error);
|
||||
}
|
||||
};
|
||||
|
||||
export const initializeTraefikService = async ({
|
||||
|
||||
Reference in New Issue
Block a user