update a few things

This commit is contained in:
Andras Bacsai
2023-08-23 16:40:59 +02:00
parent d62af76097
commit 2d8f166e4a
9 changed files with 44 additions and 29 deletions

View File

@@ -16,11 +16,21 @@ class Server extends BaseModel
ServerSetting::create([
'server_id' => $server->id,
]);
StandaloneDocker::create([
'name' => 'coolify',
'network' => 'coolify',
'server_id' => $server->id,
]);
if ($server->id === 0) {
StandaloneDocker::create([
'id' => 0,
'name' => 'coolify',
'network' => 'coolify',
'server_id' => $server->id,
]);
} else {
StandaloneDocker::create([
'name' => 'coolify',
'network' => 'coolify',
'server_id' => $server->id,
]);
}
});
static::deleting(function ($server) {
$server->settings()->delete();