mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 08:18:08 +00:00
fix(database): refresh SSL/status state and harden clone writes
Handle database status updates more reliably by listening for `ServiceChecked` and using explicit `refresh()` handlers in Livewire database components. Also switch guarded clone/create paths to `forceFill`/`forceCreate` in helper flows to avoid missing persisted attributes during app/service cloning. Update log/terminal font stacks to Geist (with bundled variable fonts) and add coverage for SSL status refresh, persistent volume UUID cloning, and log font styling.
This commit is contained in:
1 parent
1efed14169
commit
2692496726
24 files changed
+333
-33
No files matched your search
@@ -237,10 +237,11 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'application_id' => $newApplication->id,
|
||||
]);
|
||||
$newApplicationSettings->save();
|
||||
$newApplication->setRelation('settings', $newApplicationSettings->fresh());
|
||||
}
|
||||
|
||||
// Clone tags
|
||||
@@ -256,7 +257,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'uuid' => (string) new Cuid2,
|
||||
'application_id' => $newApplication->id,
|
||||
'team_id' => currentTeam()->id,
|
||||
@@ -271,7 +272,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'uuid' => (string) new Cuid2,
|
||||
'application_id' => $newApplication->id,
|
||||
'status' => 'exited',
|
||||
@@ -303,7 +304,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'uuid',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'name' => $newName,
|
||||
'resource_id' => $newApplication->id,
|
||||
]);
|
||||
@@ -339,7 +340,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'resource_id' => $newApplication->id,
|
||||
]);
|
||||
$newStorage->save();
|
||||
@@ -353,7 +354,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'resourceable_id' => $newApplication->id,
|
||||
'resourceable_type' => $newApplication->getMorphClass(),
|
||||
'is_preview' => false,
|
||||
@@ -370,7 +371,7 @@ function clone_application(Application $source, $destination, array $overrides =
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])->fill([
|
||||
])->forceFill([
|
||||
'resourceable_id' => $newApplication->id,
|
||||
'resourceable_type' => $newApplication->getMorphClass(),
|
||||
'is_preview' => true,
|
||||
|
||||
@@ -1919,7 +1919,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
// Create new serviceApplication or serviceDatabase
|
||||
if ($isDatabase) {
|
||||
if ($isNew) {
|
||||
$savedService = ServiceDatabase::create([
|
||||
$savedService = ServiceDatabase::forceCreate([
|
||||
'name' => $serviceName,
|
||||
'image' => $image,
|
||||
'service_id' => $resource->id,
|
||||
@@ -1930,7 +1930,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
'service_id' => $resource->id,
|
||||
])->first();
|
||||
if (is_null($savedService)) {
|
||||
$savedService = ServiceDatabase::create([
|
||||
$savedService = ServiceDatabase::forceCreate([
|
||||
'name' => $serviceName,
|
||||
'image' => $image,
|
||||
'service_id' => $resource->id,
|
||||
@@ -1939,7 +1939,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
}
|
||||
} else {
|
||||
if ($isNew) {
|
||||
$savedService = ServiceApplication::create([
|
||||
$savedService = ServiceApplication::forceCreate([
|
||||
'name' => $serviceName,
|
||||
'image' => $image,
|
||||
'service_id' => $resource->id,
|
||||
@@ -1950,7 +1950,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
'service_id' => $resource->id,
|
||||
])->first();
|
||||
if (is_null($savedService)) {
|
||||
$savedService = ServiceApplication::create([
|
||||
$savedService = ServiceApplication::forceCreate([
|
||||
'name' => $serviceName,
|
||||
'image' => $image,
|
||||
'service_id' => $resource->id,
|
||||
|
||||
Reference in new issue
Block a user