fix: wait 2.5s before domain PATCH after dockercompose create (async creation)
Made-with: Cursor
This commit is contained in:
@@ -536,8 +536,10 @@ export async function createDockerComposeApp(
|
|||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
}) as { uuid: string };
|
}) 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) {
|
if (opts.composeDomains && opts.composeDomains.length > 0) {
|
||||||
|
await new Promise(r => setTimeout(r, 2500));
|
||||||
await coolifyFetch(`/applications/${created.uuid}`, {
|
await coolifyFetch(`/applications/${created.uuid}`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
body: JSON.stringify(stripUndefined({
|
body: JSON.stringify(stripUndefined({
|
||||||
|
|||||||
Reference in New Issue
Block a user