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 <<