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:
Andras Bacsai
2026-08-07 14:41:11 +02:00
parent d68b198d53
commit ead27ccfa6
4 changed files with 99 additions and 4 deletions
+33
View File
@@ -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:?}');
}
});