fix: proxy configuration + starter

This commit is contained in:
Andras Bacsai
2023-09-25 09:17:42 +02:00
parent 80a797aec8
commit 51c468ae0b
9 changed files with 49 additions and 35 deletions

View File

@@ -405,17 +405,16 @@ class Service extends BaseModel
}
}
}
if ($this->server->proxyType() === ProxyTypes::TRAEFIK_V2->value) {
$labels = collect(data_get($service, 'labels', []));
$labels = collect([]);
$labels = $labels->merge(defaultLabels($this->id, $container_name, type: 'service'));
if (!$isDatabase) {
if ($fqdns) {
$labels = $labels->merge(fqdnLabelsForTraefik($fqdns, $container_name, true));
}
// Add labels to the service
$labels = collect(data_get($service, 'labels', []));
$labels = collect([]);
$labels = $labels->merge(defaultLabels($this->id, $container_name, type: 'service'));
if (!$isDatabase) {
if ($fqdns) {
$labels = $labels->merge(fqdnLabelsForTraefik($fqdns, $container_name, true));
}
data_set($service, 'labels', $labels->toArray());
}
data_set($service, 'labels', $labels->toArray());
data_forget($service, 'is_database');
data_set($service, 'restart', RESTART_MODE);
data_set($service, 'container_name', $container_name);