diff --git a/app/Jobs/DeployApplicationJob.php b/app/Jobs/DeployApplicationJob.php index e90d627d4..0a1f697e3 100644 --- a/app/Jobs/DeployApplicationJob.php +++ b/app/Jobs/DeployApplicationJob.php @@ -226,7 +226,9 @@ public function handle(): void $this->fail($e->getMessage()); } finally { // Saving docker-compose.yml - Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose); + if ($this->docker_compose) { + Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose); + } $this->executeNow(["docker rm -f {$this->deployment_uuid} >/dev/null 2>&1"], hideFromOutput: true); dispatch(new ContainerStatusJob($this->application_uuid)); } diff --git a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php new file mode 100644 index 000000000..249da8171 --- /dev/null +++ b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('failed_jobs'); + } +};