Env Test
This commit is contained in:
@@ -9,6 +9,12 @@ class Home extends BaseController
|
||||
return view('welcome_message');
|
||||
}
|
||||
|
||||
public function what_env(): string
|
||||
{
|
||||
$curr_env = $_ENV['CONFIG_NAME'];
|
||||
echo $curr_env;
|
||||
return $curr_env;
|
||||
}
|
||||
public function provision(): string
|
||||
{
|
||||
$public_path = FCPATH;
|
||||
@@ -52,7 +58,7 @@ class Home extends BaseController
|
||||
$composer_template_contents = str_replace("ALLOCATED_PORT", $allocatedPort, $composer_template_contents);
|
||||
$composer_template_contents = str_replace("CNT_DB_NAME", $ContainerName, $composer_template_contents);
|
||||
$composer_template_contents = str_replace("CNT_DB_PASS", $provisionUID, $composer_template_contents);
|
||||
$composer_template_contents = str_replace("PROVISION_UID", $provisionUID, $composer_template_contents);
|
||||
$composer_template_contents = str_replace("PROVISION_UID_REPLACE", $provisionUID, $composer_template_contents);
|
||||
//Save to the specific path
|
||||
$destination_composer_path = $ansible_folder."/parts/".$provisionUID."/docker-compose.yml";
|
||||
$composerFile = fopen( $destination_composer_path, "w") or die("Unable to open file!");
|
||||
|
||||
Reference in New Issue
Block a user