mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-02 08:20:20 +00:00
feat(services): add Jean Server one-click template and extra fields
Register the jean-server compose template, logo, and catalog entries, and expose token and allowed-origins settings on the service form. Sort extra fields by sortOrder and omit empty service-name prefixes.
This commit is contained in:
@@ -1180,6 +1180,27 @@ class Service extends BaseModel
|
||||
}
|
||||
$fields->put('Openclaw', $data->toArray());
|
||||
break;
|
||||
case $image->contains('coollabsio/jean-server'):
|
||||
$data = collect([]);
|
||||
$settings = [
|
||||
'Token' => ['key' => 'SERVICE_PASSWORD_64_JEAN', 'rules' => 'required', 'isPassword' => true, 'sortOrder' => 1, 'customHelper' => 'Token required to access Jean Server. Variable name: SERVICE_PASSWORD_64_JEAN'],
|
||||
'Allowed Origins' => ['key' => 'JEAN_ALLOWED_ORIGINS', 'rules' => 'nullable|string', 'sortOrder' => 2, 'customHelper' => 'Comma-separated additional browser origins. Same-origin access is always allowed. Variable name: JEAN_ALLOWED_ORIGINS'],
|
||||
];
|
||||
|
||||
foreach ($settings as $label => $setting) {
|
||||
$variable = $this->environment_variables()->where('key', $setting['key'])->first();
|
||||
if (! $variable) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data->put($label, [
|
||||
...$setting,
|
||||
'value' => data_get($variable, 'value'),
|
||||
]);
|
||||
}
|
||||
|
||||
$fields->put('', $data->toArray());
|
||||
break;
|
||||
default:
|
||||
$data = collect([]);
|
||||
$admin_user = $this->environment_variables()->where('key', 'SERVICE_USER_ADMIN')->first();
|
||||
|
||||
Reference in New Issue
Block a user