Skip to content

Commit f60c281

Browse files
authored
Merge pull request coollabsio#2808 from coollabsio/next
Forgot to commit, oopsy
2 parents 91783cc + 43c40cd commit f60c281

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

app/Livewire/Project/Application/General.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ public function submit($showToaster = true)
350350
$this->checkFqdns();
351351

352352
$this->application->save();
353-
354353
if (! $this->customLabels && $this->application->destination->server->proxyType() !== 'NONE') {
355354
$this->customLabels = str(implode('|coolify|', generateLabelsApplication($this->application)))->replace('|coolify|', "\n");
356355
$this->application->custom_labels = base64_encode($this->customLabels);
@@ -364,6 +363,7 @@ public function submit($showToaster = true)
364363
}
365364
}
366365
$this->validate();
366+
367367
if ($this->ports_exposes !== $this->application->ports_exposes || $this->is_container_label_escape_enabled !== $this->application->settings->is_container_label_escape_enabled) {
368368
$this->resetDefaultLabels();
369369
}
@@ -390,6 +390,7 @@ public function submit($showToaster = true)
390390
}
391391
if ($this->application->build_pack === 'dockercompose') {
392392
$this->application->docker_compose_domains = json_encode($this->parsedServiceDomains);
393+
393394
foreach ($this->parsedServiceDomains as $serviceName => $service) {
394395
$domain = data_get($service, 'domain');
395396
if ($domain) {
@@ -399,6 +400,9 @@ public function submit($showToaster = true)
399400
check_domain_usage(resource: $this->application);
400401
}
401402
}
403+
if ($this->application->isDirty('docker_compose_domains')) {
404+
$this->resetDefaultLabels();
405+
}
402406
}
403407
$this->application->custom_labels = base64_encode($this->customLabels);
404408
$this->application->save();

bootstrap/helpers/shared.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,14 +2027,20 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
20272027
domains: $fqdns,
20282028
serviceLabels: $serviceLabels,
20292029
generate_unique_uuid: $resource->build_pack === 'dockercompose',
2030-
image: data_get($service, 'image')
2030+
image: data_get($service, 'image'),
2031+
is_force_https_enabled: $resource->isForceHttpsEnabled(),
2032+
is_gzip_enabled: $resource->isGzipEnabled(),
2033+
is_stripprefix_enabled: $resource->isStripprefixEnabled(),
20312034
));
20322035
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
20332036
network: $resource->destination->network,
20342037
uuid: $resource->uuid,
20352038
domains: $fqdns,
20362039
serviceLabels: $serviceLabels,
2037-
image: data_get($service, 'image')
2040+
image: data_get($service, 'image'),
2041+
is_force_https_enabled: $resource->isForceHttpsEnabled(),
2042+
is_gzip_enabled: $resource->isGzipEnabled(),
2043+
is_stripprefix_enabled: $resource->isStripprefixEnabled(),
20382044
));
20392045
}
20402046
}
@@ -2381,7 +2387,6 @@ function check_domain_usage(ServiceApplication|Application|null $resource = null
23812387
if ($resource) {
23822388
if ($resource->getMorphClass() === 'App\Models\Application' && $resource->build_pack === 'dockercompose') {
23832389
$domains = data_get(json_decode($resource->docker_compose_domains, true), '*.domain');
2384-
ray($domains);
23852390
$domains = collect($domains);
23862391
} else {
23872392
$domains = collect($resource->fqdns);

0 commit comments

Comments
 (0)