Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method across multiple database actions for improved clarity and efficiency"
This reverts commit 18068857b1.
This commit is contained in:
@@ -204,12 +204,8 @@ class StartMysql
|
||||
}
|
||||
|
||||
$docker_compose = Yaml::dump($docker_compose, 10);
|
||||
$this->commands[] = [
|
||||
'transfer_file' => [
|
||||
'content' => $docker_compose,
|
||||
'destination' => "$this->configuration_dir/docker-compose.yml",
|
||||
],
|
||||
];
|
||||
$docker_compose_base64 = base64_encode($docker_compose);
|
||||
$this->commands[] = "echo '{$docker_compose_base64}' | base64 -d | tee $this->configuration_dir/docker-compose.yml > /dev/null";
|
||||
$readme = generate_readme_file($this->database->name, now());
|
||||
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
|
||||
$this->commands[] = "echo 'Pulling {$database->image} image.'";
|
||||
@@ -291,11 +287,7 @@ class StartMysql
|
||||
}
|
||||
$filename = 'custom-config.cnf';
|
||||
$content = $this->database->mysql_conf;
|
||||
$this->commands[] = [
|
||||
'transfer_file' => [
|
||||
'content' => $content,
|
||||
'destination' => "$this->configuration_dir/{$filename}",
|
||||
],
|
||||
];
|
||||
$content_base64 = base64_encode($content);
|
||||
$this->commands[] = "echo '{$content_base64}' | base64 -d | tee $this->configuration_dir/{$filename} > /dev/null";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user