app/RancherAccess/RancherService.php
public function createStack(string $stackName, $dockerCompose = null, $rancherCompose = null) {
		if($dockerCompose === null)
			$dockerCompose = '';
		if($rancherCompose === null)
			$rancherCompose = '';


		$url = implode('/', [
			$this->account->getUrl(),
			'environments'
		]);

		$headers = [];
		$this->addAuthHeader($headers);

		$jsonContent = json_encode([
			'name' => $stackName,
			'dockerCompose' => $dockerCompose,
			'rancherCompose' => $rancherCompose,
		]);

		$headers['Content-Type'] = 'application/json';
		$headers['Content-Length'] = strlen($jsonContent);

		$this->apiService->post($url, $jsonContent, $headers);
	}
public function createStack(string $stackName, $dockerCompose = null, $rancherCompose = null) {
		if($dockerCompose === null)
			$dockerCompose = '';
		if($rancherCompose === null)
			$rancherCompose = '';


		$url = implode('/', [
			$this->account->getUrl(),
			'environments'
		]);

		$headers = [];
		$this->addAuthHeader($headers);

		$jsonContent = json_encode([
			'name' => $stackName,
			'dockerCompose' => $dockerCompose,
			'rancherCompose' => $rancherCompose,
		]);

		$headers['Content-Type'] = 'application/json';
		$headers['Content-Length'] = strlen($jsonContent);

		$this->apiService->post($url, $jsonContent, $headers);
	}
public function createStack ( string $ stackName , $ dockerCompose = null , $ rancherCompose = null ) { if ( $ dockerCompose === null ) $ dockerCompose = '' ; if ( $ rancherCompose === null ) $ rancherCompose = '' ; $ url = implode ( '/' , [ $ this -> account -> getUrl ( ) , 'environments' ] ) ; $ headers = [ ] ; $ this -> addAuthHeader ( $ headers ) ; $ jsonContent = json_encode ( [ 'name' => $ stackName , 'dockerCompose' => $ dockerCompose , 'rancherCompose' => $ rancherCompose , ] ) ; $ headers [ 'Content-Type' ] = 'application/json' ; $ headers [ 'Content-Length' ] = strlen ( $ jsonContent ) ; $ this -> apiService -> post ( $ url , $ jsonContent , $ headers ) ; }
Prompt Rnacher to create a stack with the given name using the provided dockerCompose and rancherCompose files

@param string $stackName
@param null $dockerCompose
@param null $rancherCompose
Prompt Rnacher to create a stack with the given name using the provided dockerCompose and rancherCompose files