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
Add Directus service fields to extraFields method
Andras Bacsai53cd3091f7e5
diff --git a/app/Models/Service.php b/app/Models/Service.phpindex e8b0c97f03..3e6d2b9dbf 100644--- a/app/Models/Service.php+++ b/app/Models/Service.php@@ -102,6 +102,32 @@ class Service extends BaseModelforeach ($applications as $application) {$image = str($application->image)->before(':')->value();switch ($image) {+ case str($image)?->contains('directus'):+ $data = collect([]);+ $admin_email = $this->environment_variables()->where('key', 'ADMIN_EMAIL')->first();+ $admin_password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_ADMIN')->first();++ if ($admin_email) {+ $data = $data->merge([+ 'Admin Email' => [+ 'key' => data_get($admin_email, 'key'),+ 'value' => data_get($admin_email, 'value'),+ 'rules' => 'required|email',+ ],+ ]);+ }+ if ($admin_password) {+ $data = $data->merge([+ 'Admin Password' => [+ 'key' => data_get($admin_password, 'key'),+ 'value' => data_get($admin_password, 'value'),+ 'rules' => 'required',+ 'isPassword' => true,+ ],+ ]);+ }+ $fields->put('Directus', $data);+ break;case str($image)?->contains('kong'):$data = collect([]);$dashboard_user = $this->environment_variables()->where('key', 'SERVICE_USER_ADMIN')->first();