fix: add traefik labels no matter if traefik is selected or not
This commit is contained in:
@@ -147,7 +147,7 @@ function fqdnLabelsForTraefik(Collection $domains, $container_name, $is_force_ht
|
|||||||
{
|
{
|
||||||
$labels = collect([]);
|
$labels = collect([]);
|
||||||
$labels->push('traefik.enable=true');
|
$labels->push('traefik.enable=true');
|
||||||
foreach($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$url = Url::fromString($domain);
|
$url = Url::fromString($domain);
|
||||||
$host = $url->getHost();
|
$host = $url->getHost();
|
||||||
$path = $url->getPath();
|
$path = $url->getPath();
|
||||||
@@ -216,9 +216,8 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview
|
|||||||
} else {
|
} else {
|
||||||
$domains = Str::of(data_get($application, 'fqdn'))->explode(',');
|
$domains = Str::of(data_get($application, 'fqdn'))->explode(',');
|
||||||
}
|
}
|
||||||
if ($application->destination->server->proxy->type === ProxyTypes::TRAEFIK_V2->value) {
|
// Add Traefik labels no matter which proxy is selected
|
||||||
$labels = $labels->merge(fqdnLabelsForTraefik($domains, $container_name, $application->settings->is_force_https_enabled));
|
$labels = $labels->merge(fqdnLabelsForTraefik($domains, $container_name, $application->settings->is_force_https_enabled));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $labels->all();
|
return $labels->all();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user