From efac8e346b156ceec9ea36e24864fe0f4f5f294d Mon Sep 17 00:00:00 2001 From: Alexis Bruneteau Date: Thu, 5 Jun 2025 06:13:53 +0200 Subject: [PATCH] tag --- app/Console/Commands/DeployStaticSite.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/DeployStaticSite.php b/app/Console/Commands/DeployStaticSite.php index 548909b..b90a554 100644 --- a/app/Console/Commands/DeployStaticSite.php +++ b/app/Console/Commands/DeployStaticSite.php @@ -14,16 +14,16 @@ class DeployStaticSite extends Command public function handle() { $name = $this->argument('name'); - $host = $this->argument('host'); - $id = $this->argument('id'); + $host = $this->argument('host'); + $id = $this->argument('id'); $namespace = 'hosting-deploy'; $kubeDir = storage_path("app/kube/{$name}"); File::ensureDirectoryExists($kubeDir); // 1. Generate K8s YAMLs - File::put("{$kubeDir}/deployment.yaml", $this->deployment($name,$id, $namespace)); - File::put("{$kubeDir}/service.yaml", $this->service($name,$id, $namespace)); - File::put("{$kubeDir}/ingress.yaml", $this->ingress($name,$host,$id, $namespace)); + File::put("{$kubeDir}/deployment.yaml", $this->deployment($name, $id, $namespace)); + File::put("{$kubeDir}/service.yaml", $this->service($name, $id, $namespace)); + File::put("{$kubeDir}/ingress.yaml", $this->ingress($name, $host, $id, $namespace)); $this->info("✅ K8s manifests generated."); @@ -38,7 +38,6 @@ class DeployStaticSite extends Command '--extra-vars', "siteid={$id}" ], null, // cwd - ['HOME' => '/tmp'] // env vars ); $process->setTimeout(300); $process->run(function ($type, $buffer) { @@ -52,7 +51,7 @@ class DeployStaticSite extends Command } } - private function deployment(string $name,string $id, string $namespace): string + private function deployment(string $name, string $id, string $namespace): string { return <<