fix: wait 2.5s before domain PATCH after dockercompose create (async creation)

Made-with: Cursor
This commit is contained in:
2026-04-23 16:49:51 -07:00
parent 8c8e39d102
commit f27e572fdb

View File

@@ -536,8 +536,10 @@ export async function createDockerComposeApp(
body: JSON.stringify(body),
}) as { uuid: string };
// Set domains + https enforcement via PATCH (compose-aware)
// Coolify creates apps asynchronously. Wait briefly before PATCHing
// so the record is committed to the DB.
if (opts.composeDomains && opts.composeDomains.length > 0) {
await new Promise(r => setTimeout(r, 2500));
await coolifyFetch(`/applications/${created.uuid}`, {
method: 'PATCH',
body: JSON.stringify(stripUndefined({