mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
fix: comma in traefik custom labels
This commit is contained in:
parent
ff13cb4e26
commit
bbbd605f32
@ -874,12 +874,11 @@ private function generate_compose_file()
|
||||
$environment_variables = $this->generate_environment_variables($ports);
|
||||
|
||||
if (data_get($this->application, 'custom_labels')) {
|
||||
ray(base64_decode($this->application->custom_labels));
|
||||
$labels = collect(preg_split("/\r\n|\n|\r/", base64_decode($this->application->custom_labels)));
|
||||
$labels = $labels->filter(function ($value, $key) {
|
||||
return !Str::startsWith($value, 'coolify.');
|
||||
});
|
||||
$this->application->custom_labels = base64_encode($labels);
|
||||
$this->application->custom_labels = base64_encode($labels->implode("\n"));
|
||||
$this->application->save();
|
||||
} else {
|
||||
$labels = collect(generateLabelsApplication($this->application, $this->preview));
|
||||
|
@ -238,15 +238,12 @@ public function submit($showToaster = true)
|
||||
if ($this->application->publish_directory && $this->application->publish_directory !== '/') {
|
||||
$this->application->publish_directory = rtrim($this->application->publish_directory, '/');
|
||||
}
|
||||
$this->application->custom_labels = base64_encode($this->customLabels);
|
||||
// if (gettype($this->customLabels) === 'string') {
|
||||
// $this->customLabels = str($this->customLabels)->replace(',', "\n");
|
||||
// }
|
||||
// $this->application->custom_labels = $this->customLabels->explode("\n")->implode(',');
|
||||
if ($this->application->build_pack === 'dockercompose') {
|
||||
$this->application->docker_compose_domains = json_encode($this->parsedServiceDomains);
|
||||
$this->parsedServices = $this->application->parseCompose();
|
||||
}
|
||||
|
||||
$this->application->custom_labels = base64_encode($this->customLabels);
|
||||
$this->application->save();
|
||||
$showToaster && $this->dispatch('success', 'Application settings updated!');
|
||||
} catch (\Throwable $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user