mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-24 14:27:15 +00:00
feat(service): add Celld service template for Deno Durable Objects
Add compose template and catalog entries for Celld, with unit coverage for template metadata and required S3/AWS env configuration.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
it('includes a celld one-click service template', function () {
|
||||
$compose = file_get_contents(__DIR__.'/../../templates/compose/celld.yaml');
|
||||
|
||||
expect($compose)
|
||||
->toContain('ghcr.io/denoland/celld:${CELLD_VERSION:-v0.1.0}')
|
||||
->toContain('SERVICE_URL_CELLD_8080')
|
||||
->toContain('CELLD_BUCKET=${CELLD_BUCKET:?}')
|
||||
->toContain('S3_ENDPOINT=${S3_ENDPOINT:-}')
|
||||
->toContain('CELLD_ADDR=0.0.0.0:8080')
|
||||
->toContain('CELLD_ADVERTISE=celld:8080')
|
||||
->toContain('celld-data:/var/lib/celld');
|
||||
|
||||
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('celld');
|
||||
expect($templates['celld']['port'] ?? null)->toBe('8080');
|
||||
expect($templates['celld']['logo'] ?? null)->toBe('svgs/denoKV.svg');
|
||||
expect($templates['celld']['category'] ?? null)->toBe('backend');
|
||||
|
||||
$generatedCompose = base64_decode($templates['celld']['compose'], strict: true);
|
||||
|
||||
expect($generatedCompose)
|
||||
->toContain('ghcr.io/denoland/celld:${CELLD_VERSION:-v0.1.0}')
|
||||
->toContain('CELLD_BUCKET=${CELLD_BUCKET:?}');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user