fix: always set project name during app deployments
This commit is contained in:
		
							parent
							
								
									62b84add36
								
							
						
					
					
						commit
						e63e806572
					
				| @ -462,7 +462,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue | ||||
|             if ($this->env_filename) { | ||||
|                 $command .= " --env-file {$this->workdir}/{$this->env_filename}"; | ||||
|             } | ||||
|             $command .= " --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build"; | ||||
|             $command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build"; | ||||
|             $this->execute_remote_command( | ||||
|                 [executeInDocker($this->deployment_uuid, $command), 'hidden' => true], | ||||
|             ); | ||||
| @ -516,7 +516,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue | ||||
|                 if ($this->env_filename) { | ||||
|                     $command .= " --env-file {$this->workdir}/{$this->env_filename}"; | ||||
|                 } | ||||
|                 $command .= " --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up -d"; | ||||
|                 $command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up -d"; | ||||
|                 $this->execute_remote_command( | ||||
|                     [executeInDocker($this->deployment_uuid, $command), 'hidden' => true], | ||||
|                 ); | ||||
| @ -2034,12 +2034,12 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf"); | ||||
|         if ($this->application->build_pack === 'dockerimage') { | ||||
|             $this->application_deployment_queue->addLogEntry('Pulling latest images from the registry.'); | ||||
|             $this->execute_remote_command( | ||||
|                 [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} pull"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-directory {$this->workdir} build"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} pull"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} build"), 'hidden' => true], | ||||
|             ); | ||||
|         } else { | ||||
|             $this->execute_remote_command( | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build"), 'hidden' => true], | ||||
|             ); | ||||
|         } | ||||
|         $this->application_deployment_queue->addLogEntry('New images built.'); | ||||
| @ -2050,17 +2050,17 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf"); | ||||
|         if ($this->application->build_pack === 'dockerimage') { | ||||
|             $this->application_deployment_queue->addLogEntry('Pulling latest images from the registry.'); | ||||
|             $this->execute_remote_command( | ||||
|                 [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} pull"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-directory {$this->workdir} up --build -d"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} pull"), 'hidden' => true], | ||||
|                 [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} up --build -d"), 'hidden' => true], | ||||
|             ); | ||||
|         } else { | ||||
|             if ($this->use_build_server) { | ||||
|                 $this->execute_remote_command( | ||||
|                     ["{$this->coolify_variables} docker compose --project-directory {$this->configuration_dir} -f {$this->configuration_dir}{$this->docker_compose_location} up --build -d", 'hidden' => true], | ||||
|                     ["{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->configuration_dir} -f {$this->configuration_dir}{$this->docker_compose_location} up --build -d", 'hidden' => true], | ||||
|                 ); | ||||
|             } else { | ||||
|                 $this->execute_remote_command( | ||||
|                     [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up --build -d"), 'hidden' => true], | ||||
|                     [executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up --build -d"), 'hidden' => true], | ||||
|                 ); | ||||
|             } | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user