mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: handle race condition to catch recreation base containers
This commit is contained in:
@@ -128,7 +128,14 @@ export const initializeTraefik = async ({
|
||||
|
||||
console.log("Traefik Started ✅");
|
||||
} catch (error) {
|
||||
await docker.createService(settings);
|
||||
try {
|
||||
await docker.createService(settings);
|
||||
} catch (error: any) {
|
||||
if (error?.statusCode !== 409) {
|
||||
throw error;
|
||||
}
|
||||
console.log("Traefik service already exists, continuing...");
|
||||
}
|
||||
console.log("Traefik Not Found: Starting ✅");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user