refactor(file-transfer): replace base64 encoding with direct file transfer method across multiple database actions for improved clarity and efficiency

This commit is contained in:
Andras Bacsai
2025-09-08 14:04:24 +02:00
parent 852b2688d9
commit 18068857b1
17 changed files with 298 additions and 107 deletions

View File

@@ -196,8 +196,12 @@ class StartRedis
$docker_compose = generateCustomDockerRunOptionsForDatabases($docker_run_options, $docker_compose, $container_name, $this->database->destination->network);
$docker_compose = Yaml::dump($docker_compose, 10);
$docker_compose_base64 = base64_encode($docker_compose);
$this->commands[] = "echo '{$docker_compose_base64}' | base64 -d | tee $this->configuration_dir/docker-compose.yml > /dev/null";
$this->commands[] = [
'transfer_file' => [
'content' => $docker_compose,
'destination' => "$this->configuration_dir/docker-compose.yml",
],
];
$readme = generate_readme_file($this->database->name, now());
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
$this->commands[] = "echo 'Pulling {$database->image} image.'";