This commit is contained in:
CHIEFSOFT\ameye
2025-08-23 21:21:48 -04:00
parent 09ce93c9b7
commit 1f950d6793
4 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -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!");