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:
Andras Bacsai committed 2026-08-13 11:00:04 +02:00
1 parent 9794ce2686
commit c3f485e0d6
9 files changed
+165 -2

No files matched your search

+27
View File
@@ -45,3 +45,30 @@ it('only adds Grafana extra fields for Grafana server images', function (string
'promtail' => ['grafana/promtail:latest', false],
'tempo' => ['grafana/tempo:latest', false],
]);
it('exposes Jean Server authentication and access settings', function () {
$service = serviceExtraFieldsTestServiceWithApplicationImage('ghcr.io/coollabsio/jean-server:latest');
$service->environment_variables()->createMany([
['key' => 'SERVICE_PASSWORD_64_JEAN', 'value' => 'secret-token', 'is_preview' => false],
['key' => 'JEAN_ALLOWED_ORIGINS', 'value' => 'https://jean.example.com', 'is_preview' => false],
]);
$fields = $service->extraFields();
expect($fields)->toHaveKey('')
->and($fields[''])->toMatchArray([
'Token' => [
'key' => 'SERVICE_PASSWORD_64_JEAN',
'value' => 'secret-token',
'rules' => 'required',
'isPassword' => true,
'sortOrder' => 1,
],
'Allowed Origins' => [
'key' => 'JEAN_ALLOWED_ORIGINS',
'value' => 'https://jean.example.com',
'sortOrder' => 2,
],
]);
});
+39
View File
@@ -0,0 +1,39 @@
<?php
it('includes a Jean Server one-click service template with all deployment environment variables', function () {
$compose = file_get_contents(__DIR__.'/../../templates/compose/jean.yaml');
expect($compose)
->toContain('ghcr.io/coollabsio/jean-server:${JEAN_VERSION:-latest}')
->toContain('SERVICE_URL_JEAN_3456')
->toContain('JEAN_HEADLESS=${JEAN_HEADLESS:-1}')
->toContain('JEAN_HOST=${JEAN_HOST:-0.0.0.0}')
->toContain('JEAN_PORT=${JEAN_PORT:-3456}')
->toContain('JEAN_TOKEN=${SERVICE_PASSWORD_64_JEAN}')
->toContain('JEAN_NO_TOKEN=${JEAN_NO_TOKEN:-0}')
->toContain('JEAN_ALLOW_UNSAFE_NO_TOKEN=${JEAN_ALLOW_UNSAFE_NO_TOKEN:-0}')
->toContain('JEAN_ALLOW_NATIVE_OPEN=${JEAN_ALLOW_NATIVE_OPEN:-0}')
->toContain('JEAN_ALLOWED_ORIGINS=${JEAN_ALLOWED_ORIGINS:-}')
->toContain('JEAN_DATA_DIR=/home/jean/.local/share/com.jean.desktop')
->toContain('jean-data:/home/jean/.local/share/com.jean.desktop')
->toContain('http://127.0.0.1:3456/readyz');
foreach (['service-templates.json', 'service-templates-latest.json'] as $templateFile) {
$templates = json_decode(
file_get_contents(__DIR__."/../../templates/{$templateFile}"),
associative: true,
flags: JSON_THROW_ON_ERROR,
);
expect($templates)->toHaveKey('jean');
expect($templates['jean']['port'] ?? null)->toBe('3456');
expect($templates['jean']['logo'] ?? null)->toBe('svgs/jean.png');
expect($templates['jean']['category'] ?? null)->toBe('development');
$generatedCompose = base64_decode($templates['jean']['compose'], strict: true);
expect($generatedCompose)
->toContain('ghcr.io/coollabsio/jean-server:${JEAN_VERSION:-latest}')
->toContain('JEAN_TOKEN=${SERVICE_PASSWORD_64_JEAN}');
}
});