fix: domains for compose bp
This commit is contained in:
		| @@ -146,7 +146,6 @@ class General extends Component | ||||
|             $this->parsedServiceDomains[$serviceName]['domain'] = $domain; | ||||
|             $this->application->docker_compose_domains = json_encode($this->parsedServiceDomains); | ||||
|             $this->application->save(); | ||||
|             $this->dispatch('success', 'Domain generated.'); | ||||
|         } | ||||
|         return $domain; | ||||
|     } | ||||
|   | ||||
| @@ -966,9 +966,6 @@ class Application extends BaseModel | ||||
|     function loadComposeFile($isInit = false) | ||||
|     { | ||||
|         $initialDockerComposeLocation = $this->docker_compose_location; | ||||
|         $initialDockerComposeRaw = $this->docker_compose_raw; | ||||
|         // $initialDockerComposePrLocation = $this->docker_compose_pr_location;
 | ||||
|         if ($this->build_pack === 'dockercompose') { | ||||
|         if ($isInit && $this->docker_compose_raw) { | ||||
|             return; | ||||
|         } | ||||
| @@ -1022,8 +1019,19 @@ class Application extends BaseModel | ||||
|         ]); | ||||
|         instant_remote_process($commands, $this->destination->server, false); | ||||
|         $parsedServices = $this->parseCompose(); | ||||
|             if (md5($this->docker_compose_raw) !== md5($initialDockerComposeRaw)) { | ||||
|         if ($this->docker_compose_domains) { | ||||
|             $json = collect(json_decode($this->docker_compose_domains)); | ||||
|             $names = collect(data_get($parsedServices, 'services'))->keys()->toArray(); | ||||
|             $jsonNames = $json->keys()->toArray(); | ||||
|             $diff = array_diff($jsonNames, $names); | ||||
|             $json = $json->filter(function ($value, $key) use ($diff) { | ||||
|                 return !in_array($key, $diff); | ||||
|             }); | ||||
|             if ($json) { | ||||
|                 $this->docker_compose_domains = json_encode($json); | ||||
|             } else { | ||||
|                 $this->docker_compose_domains = null; | ||||
|             } | ||||
|             $this->save(); | ||||
|         } | ||||
|         return [ | ||||
| @@ -1032,7 +1040,6 @@ class Application extends BaseModel | ||||
|             'initialDockerComposePrLocation' => $this->docker_compose_pr_location, | ||||
|         ]; | ||||
|     } | ||||
|     } | ||||
|     function parseContainerLabels(?ApplicationPreview $preview = null) | ||||
|     { | ||||
|         $customLabels = data_get($this, 'custom_labels'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai