mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
Merge remote-tracking branch 'origin/main' into next
This commit is contained in:
@@ -233,7 +233,7 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource)
|
||||
// IMPORTANT: Only extract variables that are DIRECTLY DECLARED for this service,
|
||||
// not variables that are merely referenced from other services
|
||||
$serviceConfig = data_get($dockerCompose, "services.{$name}");
|
||||
$environment = data_get($serviceConfig, 'environment', []);
|
||||
$environment = data_get($serviceConfig, 'environment') ?? [];
|
||||
$templateVariableNames = [];
|
||||
|
||||
foreach ($environment as $key => $value) {
|
||||
|
||||
@@ -318,6 +318,21 @@ it('adds a domain to a selected service application', function () {
|
||||
->not->toBeNull();
|
||||
});
|
||||
|
||||
it('adds a domain when the compose service has an empty environment section', function () {
|
||||
$this->service->update([
|
||||
'docker_compose_raw' => "services:\n web:\n image: nginx:alpine\n environment:\n api:\n image: node:alpine\n",
|
||||
]);
|
||||
|
||||
Livewire::test(Domains::class, ['service' => $this->service->fresh(['applications', 'server'])])
|
||||
->set('newServiceApplicationId', $this->webApp->id)
|
||||
->set('newDomain', 'https://web.example.com')
|
||||
->call('addDomain')
|
||||
->assertHasNoErrors()
|
||||
->assertDispatched('success');
|
||||
|
||||
expect($this->webApp->fresh()->fqdn)->toBe('https://web.example.com');
|
||||
});
|
||||
|
||||
it('keeps a stable key for the rendered domain list', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/service/domains.blade.php'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user