diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index fa828acbe..1b14e7e12 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -123,6 +123,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->source = $source->getMorphClass()::where('id', $this->application->source->id)->first();
}
$this->server = Server::find($this->application_deployment_queue->server_id);
+ $this->timeout = $this->server->settings->dynamic_timeout;
$this->destination = $this->server->destinations()->where('id', $this->application_deployment_queue->destination_id)->first();
$this->server = $this->mainServer = $this->destination->server;
$this->serverUser = $this->server->user;
@@ -535,7 +536,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
}
private function push_to_docker_registry()
{
- $forceFail = false;
+ $forceFail = true;
if (str($this->application->docker_registry_image_name)->isEmpty()) {
ray('empty docker_registry_image_name');
return;
diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php
index 936f8e724..bb9c7c3a1 100644
--- a/app/Livewire/Server/Form.php
+++ b/app/Livewire/Server/Form.php
@@ -28,6 +28,7 @@ class Form extends Component
'server.settings.is_swarm_worker' => 'required|boolean',
'server.settings.is_build_server' => 'required|boolean',
'server.settings.concurrent_builds' => 'required|integer|min:1',
+ 'server.settings.dynamic_timeout' => 'required|integer|min:1',
'wildcard_domain' => 'nullable|url',
];
protected $validationAttributes = [
@@ -42,6 +43,8 @@ class Form extends Component
'server.settings.is_swarm_worker' => 'Swarm Worker',
'server.settings.is_build_server' => 'Build Server',
'server.settings.concurrent_builds' => 'Concurrent Builds',
+ 'server.settings.dynamic_timeout' => 'Dynamic Timeout',
+
];
public function mount()
diff --git a/config/queue.php b/config/queue.php
index 2ef618584..a46085a9f 100644
--- a/config/queue.php
+++ b/config/queue.php
@@ -65,7 +65,7 @@ return [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
- 'retry_after' => 3600,
+ 'retry_after' => 86400,
'block_for' => null,
'after_commit' => true,
],
diff --git a/database/migrations/2024_02_08_112304_add_dynamic_timeout_for_deployments.php b/database/migrations/2024_02_08_112304_add_dynamic_timeout_for_deployments.php
new file mode 100644
index 000000000..f45bd7a2a
--- /dev/null
+++ b/database/migrations/2024_02_08_112304_add_dynamic_timeout_for_deployments.php
@@ -0,0 +1,28 @@
+integer('dynamic_timeout')->default(3600);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('server_settings', function (Blueprint $table) {
+ $table->dropColumn('dynamic_timeout');
+ });
+ }
+};
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index 0a50321e8..8259a997d 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -42,7 +42,7 @@
For instance, if you set "https://example.com" as your wildcard domain, your applications will receive domains like "https://randomId.example.com".' />
@endif
@@ -61,7 +61,7 @@
label="Use it as a build server?" />
@else