refactor(jobs): comment out unused Caddy label handling in ApplicationDeploymentJob and simplify proxy path logic in Server model
This commit is contained in:
@@ -1712,25 +1712,25 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
$labels = $labels->filter(function ($value, $key) {
|
$labels = $labels->filter(function ($value, $key) {
|
||||||
return ! Str::startsWith($value, 'coolify.');
|
return ! Str::startsWith($value, 'coolify.');
|
||||||
});
|
});
|
||||||
$found_caddy_labels = $labels->filter(function ($value, $key) {
|
// $found_caddy_labels = $labels->filter(function ($value, $key) {
|
||||||
return Str::startsWith($value, 'caddy_');
|
// return Str::startsWith($value, 'caddy_');
|
||||||
});
|
// });
|
||||||
if ($found_caddy_labels->count() === 0) {
|
// if ($found_caddy_labels->count() === 0) {
|
||||||
if ($this->pull_request_id !== 0) {
|
// if ($this->pull_request_id !== 0) {
|
||||||
$domains = str(data_get($this->preview, 'fqdn'))->explode(',');
|
// $domains = str(data_get($this->preview, 'fqdn'))->explode(',');
|
||||||
} else {
|
// } else {
|
||||||
$domains = str(data_get($this->application, 'fqdn'))->explode(',');
|
// $domains = str(data_get($this->application, 'fqdn'))->explode(',');
|
||||||
}
|
// }
|
||||||
$labels = $labels->merge(fqdnLabelsForCaddy(
|
// $labels = $labels->merge(fqdnLabelsForCaddy(
|
||||||
network: $this->application->destination->network,
|
// network: $this->application->destination->network,
|
||||||
uuid: $this->application->uuid,
|
// uuid: $this->application->uuid,
|
||||||
domains: $domains,
|
// domains: $domains,
|
||||||
onlyPort: $onlyPort,
|
// onlyPort: $onlyPort,
|
||||||
is_force_https_enabled: $this->application->isForceHttpsEnabled(),
|
// is_force_https_enabled: $this->application->isForceHttpsEnabled(),
|
||||||
is_gzip_enabled: $this->application->isGzipEnabled(),
|
// is_gzip_enabled: $this->application->isGzipEnabled(),
|
||||||
is_stripprefix_enabled: $this->application->isStripprefixEnabled()
|
// is_stripprefix_enabled: $this->application->isStripprefixEnabled()
|
||||||
));
|
// ));
|
||||||
}
|
// }
|
||||||
$this->application->custom_labels = base64_encode($labels->implode("\n"));
|
$this->application->custom_labels = base64_encode($labels->implode("\n"));
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -492,11 +492,7 @@ $schema://$host {
|
|||||||
if ($proxyType === ProxyTypes::TRAEFIK->value) {
|
if ($proxyType === ProxyTypes::TRAEFIK->value) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
} elseif ($proxyType === ProxyTypes::CADDY->value) {
|
} elseif ($proxyType === ProxyTypes::CADDY->value) {
|
||||||
if (isDev()) {
|
|
||||||
$proxy_path = '/var/lib/docker/volumes/coolify_dev_coolify_data/_data/proxy/caddy';
|
|
||||||
} else {
|
|
||||||
$proxy_path = $proxy_path.'/caddy';
|
$proxy_path = $proxy_path.'/caddy';
|
||||||
}
|
|
||||||
} elseif ($proxyType === ProxyTypes::NGINX->value) {
|
} elseif ($proxyType === ProxyTypes::NGINX->value) {
|
||||||
if (isDev()) {
|
if (isDev()) {
|
||||||
$proxy_path = '/var/lib/docker/volumes/coolify_dev_coolify_data/_data/proxy/nginx';
|
$proxy_path = '/var/lib/docker/volumes/coolify_dev_coolify_data/_data/proxy/nginx';
|
||||||
|
|||||||
Reference in New Issue
Block a user