An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: random generated uuid will be full length (not 7 characters)
Andras Bacsai6a4aa492c06e
diff --git a/app/Http/Controllers/Api/ApplicationsController.php b/app/Http/Controllers/Api/ApplicationsController.phpindex 57eba368e2..a83c17874f 100644--- a/app/Http/Controllers/Api/ApplicationsController.php+++ b/app/Http/Controllers/Api/ApplicationsController.php@@ -739,7 +739,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -835,7 +835,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -927,7 +927,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -947,7 +947,7 @@ class ApplicationsController extends Controller]));} elseif ($type === 'dockerfile') {if (! $request->has('name')) {- $request->offsetSet('name', 'dockerfile-'.new Cuid2(7));+ $request->offsetSet('name', 'dockerfile-'.new Cuid2());}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -1009,7 +1009,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -1025,7 +1025,7 @@ class ApplicationsController extends Controller]));} elseif ($type === 'dockerimage') {if (! $request->has('name')) {- $request->offsetSet('name', 'docker-image-'.new Cuid2(7));+ $request->offsetSet('name', 'docker-image-'.new Cuid2());}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -1067,7 +1067,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -1099,7 +1099,7 @@ class ApplicationsController extends Controller], 422);}if (! $request->has('name')) {- $request->offsetSet('name', 'service'.new Cuid2(7));+ $request->offsetSet('name', 'service'.new Cuid2());}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -2322,7 +2322,7 @@ class ApplicationsController extends Controllerreturn response()->json(['message' => 'Application not found.'], 404);}- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,@@ -2479,7 +2479,7 @@ class ApplicationsController extends Controllerreturn response()->json(['message' => 'Application not found.'], 404);}- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,diff --git a/app/Http/Controllers/Api/DeployController.php b/app/Http/Controllers/Api/DeployController.phpindex 03d02ae38d..838d42df5f 100644--- a/app/Http/Controllers/Api/DeployController.php+++ b/app/Http/Controllers/Api/DeployController.php@@ -290,7 +290,7 @@ class DeployController extends Controller}switch ($resource?->getMorphClass()) {case 'App\Models\Application':- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $resource,deployment_uuid: $deployment_uuid,diff --git a/app/Http/Controllers/Webhook/Bitbucket.php b/app/Http/Controllers/Webhook/Bitbucket.phpindex 059438ff4c..720bf85bb5 100644--- a/app/Http/Controllers/Webhook/Bitbucket.php+++ b/app/Http/Controllers/Webhook/Bitbucket.php@@ -103,7 +103,7 @@ class Bitbucket extends Controllerif ($x_bitbucket_event === 'repo:push') {if ($application->isDeployable()) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -127,7 +127,7 @@ class Bitbucket extends Controllerif ($x_bitbucket_event === 'pullrequest:created') {if ($application->isPRDeployable()) {ray('Deploying preview for '.$application->name.' with branch '.$branch.' and base branch '.$base_branch.' and pull request id '.$pull_request_id);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Http/Controllers/Webhook/Gitea.php b/app/Http/Controllers/Webhook/Gitea.phpindex e6d91efd6d..26ba7a0e29 100644--- a/app/Http/Controllers/Webhook/Gitea.php+++ b/app/Http/Controllers/Webhook/Gitea.php@@ -123,7 +123,7 @@ class Gitea extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -162,7 +162,7 @@ class Gitea extends Controllerif ($x_gitea_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Http/Controllers/Webhook/Github.php b/app/Http/Controllers/Webhook/Github.phpindex ee51b6e0db..56af8644f8 100644--- a/app/Http/Controllers/Webhook/Github.php+++ b/app/Http/Controllers/Webhook/Github.php@@ -128,7 +128,7 @@ class Github extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -167,7 +167,7 @@ class Github extends Controllerif ($x_github_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {@@ -357,7 +357,7 @@ class Github extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -396,7 +396,7 @@ class Github extends Controllerif ($x_github_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {ApplicationPreview::create([diff --git a/app/Http/Controllers/Webhook/Gitlab.php b/app/Http/Controllers/Webhook/Gitlab.phpindex f6e6cf7e7a..ad0142a641 100644--- a/app/Http/Controllers/Webhook/Gitlab.php+++ b/app/Http/Controllers/Webhook/Gitlab.php@@ -137,7 +137,7 @@ class Gitlab extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -177,7 +177,7 @@ class Gitlab extends Controllerif ($x_gitlab_event === 'merge_request') {if ($action === 'open' || $action === 'opened' || $action === 'synchronize' || $action === 'reopened' || $action === 'reopen' || $action === 'update') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Livewire/Destination/New/Docker.php b/app/Livewire/Destination/New/Docker.phpindex f822cfa5f7..2238be22d9 100644--- a/app/Livewire/Destination/New/Docker.php+++ b/app/Livewire/Destination/New/Docker.php@@ -52,7 +52,7 @@ class Docker extends Componentif (request()->query('network_name')) {$this->network = request()->query('network_name');} else {- $this->network = new Cuid2(7);+ $this->network = new Cuid2();}if ($this->servers->count() > 0) {$this->name = str("{$this->servers->first()->name}-{$this->network}")->kebab();diff --git a/app/Livewire/MonacoEditor.php b/app/Livewire/MonacoEditor.phpindex 156c63d3a1..52b501f18f 100644--- a/app/Livewire/MonacoEditor.php+++ b/app/Livewire/MonacoEditor.php@@ -39,7 +39,7 @@ class MonacoEditor extends Componentpublic function render(){if (is_null($this->id)) {- $this->id = new Cuid2(7);+ $this->id = new Cuid2();}if (is_null($this->name)) {diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.phpindex 7dfd9bad47..b201f9c389 100644--- a/app/Livewire/Project/Application/General.php+++ b/app/Livewire/Project/Application/General.php@@ -228,7 +228,7 @@ class General extends Componentpublic function generateDomain(string $serviceName){- $uuid = new Cuid2(7);+ $uuid = new Cuid2();$domain = generateFqdn($this->application->destination->server, $uuid);$this->parsedServiceDomains[$serviceName]['domain'] = $domain;$this->application->docker_compose_domains = json_encode($this->parsedServiceDomains);diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.phpindex feb54c7f04..415b44ed4f 100644--- a/app/Livewire/Project/Application/Heading.php+++ b/app/Livewire/Project/Application/Heading.php@@ -102,7 +102,7 @@ class Heading extends Componentprotected function setDeploymentUuid(){- $this->deploymentUuid = new Cuid2(7);+ $this->deploymentUuid = new Cuid2();$this->parameters['deployment_uuid'] = $this->deploymentUuid;}diff --git a/app/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.phpindex df64c3fd35..36838d3a59 100644--- a/app/Livewire/Project/Application/Previews.php+++ b/app/Livewire/Project/Application/Previews.php@@ -85,7 +85,7 @@ class Previews extends Component$template = $this->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2(7);+ $random = new Cuid2();$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $preview->pull_request_id, $preview_fqdn);@@ -170,7 +170,7 @@ class Previews extends Componentprotected function setDeploymentUuid(){- $this->deployment_uuid = new Cuid2(7);+ $this->deployment_uuid = new Cuid2();$this->parameters['deployment_uuid'] = $this->deployment_uuid;}diff --git a/app/Livewire/Project/Application/PreviewsCompose.php b/app/Livewire/Project/Application/PreviewsCompose.phpindex bf4478e538..2cb8fd6cfb 100644--- a/app/Livewire/Project/Application/PreviewsCompose.php+++ b/app/Livewire/Project/Application/PreviewsCompose.php@@ -44,7 +44,7 @@ class PreviewsCompose extends Component$template = $this->preview->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2(7);+ $random = new Cuid2();$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $this->preview->pull_request_id, $preview_fqdn);diff --git a/app/Livewire/Project/Application/Rollback.php b/app/Livewire/Project/Application/Rollback.phpindex ed0ac1cef1..a9a4d27680 100644--- a/app/Livewire/Project/Application/Rollback.php+++ b/app/Livewire/Project/Application/Rollback.php@@ -23,7 +23,7 @@ class Rollback extends Componentpublic function rollbackImage($commit){- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();queue_application_deployment(application: $this->application,diff --git a/app/Livewire/Project/CloneMe.php b/app/Livewire/Project/CloneMe.phpindex 5373f1b3f2..daa766828d 100644--- a/app/Livewire/Project/CloneMe.php+++ b/app/Livewire/Project/CloneMe.php@@ -47,7 +47,7 @@ class CloneMe extends Component$this->environment = $this->project->environments->where('name', $this->environment_name)->first();$this->project_id = $this->project->id;$this->servers = currentTeam()->servers;- $this->newName = str($this->project->name.'-clone-'.(string) new Cuid2(7))->slug();+ $this->newName = str($this->project->name.'-clone-'.(string) new Cuid2())->slug();}public function render()@@ -106,7 +106,7 @@ class CloneMe extends Component$databases = $this->environment->databases();$services = $this->environment->services;foreach ($applications as $application) {- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$newApplication = $application->replicate()->fill(['uuid' => $uuid,'fqdn' => generateFqdn($this->server, $uuid),@@ -133,7 +133,7 @@ class CloneMe extends Component}}foreach ($databases as $database) {- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$newDatabase = $database->replicate()->fill(['uuid' => $uuid,'status' => 'exited',@@ -161,7 +161,7 @@ class CloneMe extends Component}}foreach ($services as $service) {- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$newService = $service->replicate()->fill(['uuid' => $uuid,'environment_id' => $environment->id,diff --git a/app/Livewire/Project/New/DockerImage.php b/app/Livewire/Project/New/DockerImage.phpindex fdad052c73..2fa48ad7af 100644--- a/app/Livewire/Project/New/DockerImage.php+++ b/app/Livewire/Project/New/DockerImage.php@@ -48,7 +48,7 @@ class DockerImage extends Component$environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first();ray($image, $tag);$application = Application::create([- 'name' => 'docker-image-'.new Cuid2(7),+ 'name' => 'docker-image-'.new Cuid2(),'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify','git_branch' => 'main',diff --git a/app/Livewire/Project/New/SimpleDockerfile.php b/app/Livewire/Project/New/SimpleDockerfile.phpindex 6f6bc9185a..883b629fa2 100644--- a/app/Livewire/Project/New/SimpleDockerfile.php+++ b/app/Livewire/Project/New/SimpleDockerfile.php@@ -53,7 +53,7 @@ CMD ["nginx", "-g", "daemon off;"]$port = 80;}$application = Application::create([- 'name' => 'dockerfile-'.new Cuid2(7),+ 'name' => 'dockerfile-'.new Cuid2(),'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify','git_branch' => 'main',diff --git a/app/Livewire/Project/Shared/Danger.php b/app/Livewire/Project/Shared/Danger.phpindex 30c35410fd..839d6d89e0 100644--- a/app/Livewire/Project/Shared/Danger.php+++ b/app/Livewire/Project/Shared/Danger.php@@ -22,7 +22,7 @@ class Danger extends Componentpublic function mount(){- $this->modalId = new Cuid2(7);+ $this->modalId = new Cuid2();$parameters = get_route_parameters();$this->projectUuid = data_get($parameters, 'project_uuid');$this->environmentName = data_get($parameters, 'environment_name');diff --git a/app/Livewire/Project/Shared/Destination.php b/app/Livewire/Project/Shared/Destination.phpindex 22ada8ab8b..b2528e0761 100644--- a/app/Livewire/Project/Shared/Destination.php+++ b/app/Livewire/Project/Shared/Destination.php@@ -67,7 +67,7 @@ class Destination extends Componentreturn;}- $deployment_uuid = new Cuid2(7);+ $deployment_uuid = new Cuid2();$server = Server::find($server_id);$destination = StandaloneDocker::find($network_id);queue_application_deployment(diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.phpindex d1edaf4f52..b7660aa614 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php@@ -39,7 +39,7 @@ class All extends Componentif (str($this->resourceClass)->contains($resourceWithPreviews) && ! $simpleDockerfile) {$this->showPreview = true;}- $this->modalId = new Cuid2(7);+ $this->modalId = new Cuid2();$this->sortMe();$this->getDevView();}diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.phpindex c21d899e54..279c809f3c 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php@@ -51,7 +51,7 @@ class Show extends Componentif ($this->env->getMorphClass() === 'App\Models\SharedEnvironmentVariable') {$this->isSharedVariable = true;}- $this->modalId = new Cuid2(7);+ $this->modalId = new Cuid2();$this->parameters = get_route_parameters();$this->checkEnvs();}diff --git a/app/Livewire/Project/Shared/ResourceOperations.php b/app/Livewire/Project/Shared/ResourceOperations.phpindex 586a125ae7..466104d24b 100644--- a/app/Livewire/Project/Shared/ResourceOperations.php+++ b/app/Livewire/Project/Shared/ResourceOperations.php@@ -39,7 +39,7 @@ class ResourceOperations extends Componentif (! $new_destination) {return $this->addError('destination_id', 'Destination not found.');}- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$server = $new_destination->server;if ($this->resource->getMorphClass() === 'App\Models\Application') {$new_resource = $this->resource->replicate()->fill([@@ -87,7 +87,7 @@ class ResourceOperations extends Component$this->resource->getMorphClass() === 'App\Models\StandaloneDragonfly' ||$this->resource->getMorphClass() === 'App\Models\StandaloneClickhouse') {- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$new_resource = $this->resource->replicate()->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,@@ -121,7 +121,7 @@ class ResourceOperations extends Componentreturn redirect()->to($route);} elseif ($this->resource->type() === 'service') {- $uuid = (string) new Cuid2(7);+ $uuid = (string) new Cuid2();$new_resource = $this->resource->replicate()->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,diff --git a/app/Livewire/Project/Shared/ScheduledTask/Show.php b/app/Livewire/Project/Shared/ScheduledTask/Show.phpindex dbd420d949..c1b2bc9893 100644--- a/app/Livewire/Project/Shared/ScheduledTask/Show.php+++ b/app/Livewire/Project/Shared/ScheduledTask/Show.php@@ -47,7 +47,7 @@ class Show extends Component$this->resource = Service::where('uuid', $this->parameters['service_uuid'])->firstOrFail();}- $this->modalId = new Cuid2(7);+ $this->modalId = new Cuid2();$this->task = ModelsScheduledTask::where('uuid', request()->route('task_uuid'))->first();}diff --git a/app/Models/ApplicationPreview.php b/app/Models/ApplicationPreview.phpindex 3bdd24014f..8f5b6d000d 100644--- a/app/Models/ApplicationPreview.php+++ b/app/Models/ApplicationPreview.php@@ -49,7 +49,7 @@ class ApplicationPreview extends BaseModel$template = $this->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2(7);+ $random = new Cuid2();$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $this->pull_request_id, $preview_fqdn);diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.phpindex 7e028a6b50..d29328f077 100644--- a/app/Models/BaseModel.php+++ b/app/Models/BaseModel.php@@ -14,7 +14,7 @@ abstract class BaseModel extends Modelstatic::creating(function (Model $model) {// Generate a UUID if one isn't setif (! $model->uuid) {- $model->uuid = (string) new Cuid2(7);+ $model->uuid = (string) new Cuid2();}});}diff --git a/app/View/Components/Forms/Datalist.php b/app/View/Components/Forms/Datalist.phpindex df0c1cb118..742d5a005c 100644--- a/app/View/Components/Forms/Datalist.php+++ b/app/View/Components/Forms/Datalist.php@@ -30,7 +30,7 @@ class Datalist extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2(7);+ $this->id = new Cuid2();}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Input.php b/app/View/Components/Forms/Input.phpindex 35448d5e5b..017049e285 100644--- a/app/View/Components/Forms/Input.php+++ b/app/View/Components/Forms/Input.php@@ -27,7 +27,7 @@ class Input extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2(7);+ $this->id = new Cuid2();}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Select.php b/app/View/Components/Forms/Select.phpindex 21c147c2b0..33d1c86a0f 100644--- a/app/View/Components/Forms/Select.php+++ b/app/View/Components/Forms/Select.php@@ -30,7 +30,7 @@ class Select extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2(7);+ $this->id = new Cuid2();}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Textarea.php b/app/View/Components/Forms/Textarea.phpindex 7d1860500d..ca80fc197a 100644--- a/app/View/Components/Forms/Textarea.php+++ b/app/View/Components/Forms/Textarea.php@@ -41,7 +41,7 @@ class Textarea extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2(7);+ $this->id = new Cuid2();}if (is_null($this->name)) {$this->name = $this->id;diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.phpindex 5bfdcce782..0e7ce9dbc6 100644--- a/bootstrap/helpers/databases.php+++ b/bootstrap/helpers/databases.php@@ -14,7 +14,7 @@ use Visus\Cuid2\Cuid2;function generate_database_name(string $type): string{- $cuid = new Cuid2(7);+ $cuid = new Cuid2();return $type.'-database-'.$cuid;}diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.phpindex 0aa5c6b74e..14460ac506 100644--- a/bootstrap/helpers/docker.php+++ b/bootstrap/helpers/docker.php@@ -338,7 +338,7 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_foreach ($domains as $loop => $domain) {try {if ($generate_unique_uuid) {- $uuid = new Cuid2(7);+ $uuid = new Cuid2();}$url = Url::fromString($domain);diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex d67a784499..f722b544c1 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -200,7 +200,7 @@ function generate_random_name(?string $cuid = null): string]);if (is_null($cuid)) {- $cuid = new Cuid2(7);+ $cuid = new Cuid2();}return Str::kebab("{$generator->getName()}-$cuid");@@ -236,7 +236,7 @@ function formatPrivateKey(string $privateKey)function generate_application_name(string $git_repository, string $git_branch, ?string $cuid = null): string{if (is_null($cuid)) {- $cuid = new Cuid2(7);+ $cuid = new Cuid2();}return Str::kebab("$git_repository:$git_branch-$cuid");@@ -2015,7 +2015,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal$template = $resource->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2(7);+ $random = new Cuid2();$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $pull_request_id, $preview_fqdn);