diff --git a/lib/coolify.ts b/lib/coolify.ts index 936bb65..6b9433d 100644 --- a/lib/coolify.ts +++ b/lib/coolify.ts @@ -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({