Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

wip

Andras Bacsai4fc8821cbab7
diff --git a/app/Http/Livewire/Application/Heading.php b/app/Http/Livewire/Application/Heading.php
index 619d4b8baa..99bc7d4f84 100644
--- a/app/Http/Livewire/Application/Heading.php
+++ b/app/Http/Livewire/Application/Heading.php
@@ -42,14 +42,6 @@ class Heading extends Component
'environment_name' => $this->parameters['environment_name'],
]);
}
- public function force_deploy_with_debug()
- {
- if ($this->application->settings->is_debug_enabled == false) {
- $this->application->settings->is_debug_enabled = true;
- $this->application->settings->save();
- }
- $this->deploy();
- }
public function force_deploy_without_cache()
{
$this->deploy(force_rebuild: true);
diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.php
deleted file mode 100644
index 1e18772f44..0000000000
--- a/app/Http/Livewire/Project/Application/Deploy.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-namespace App\Http\Livewire\Project\Application;
-
-use App\Jobs\ApplicationContainerStatusJob;
-use App\Models\Application;
-use Livewire\Component;
-use Visus\Cuid2\Cuid2;
-
-class Deploy extends Component
-{
- public string $applicationId;
- public $activity;
- public $status;
- public Application $application;
- public $destination;
- public array $parameters;
-
- protected string $deploymentUuid;
- protected array $command = [];
- protected $source;
-
- protected $listeners = [
- 'applicationStatusChanged',
- ];
-
- public function mount()
- {
- $this->parameters = getRouteParameters();
- $this->application = Application::where('id', $this->applicationId)->first();
- $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first();
- }
- public function applicationStatusChanged()
- {
- $this->application->refresh();
- }
- protected function setDeploymentUuid()
- {
- $this->deploymentUuid = new Cuid2(7);
- $this->parameters['deployment_uuid'] = $this->deploymentUuid;
- }
- public function deploy(bool $force = false, bool|null $debug = null)
- {
- if ($debug && !$this->application->settings->is_debug_enabled) {
- $this->application->settings->is_debug_enabled = true;
- $this->application->settings->save();
- }
- $this->setDeploymentUuid();
-
- queue_application_deployment(
- application_id: $this->application->id,
- deployment_uuid: $this->deploymentUuid,
- force_rebuild: $force,
- );
- return redirect()->route('project.application.deployment', [
- 'project_uuid' => $this->parameters['project_uuid'],
- 'application_uuid' => $this->parameters['application_uuid'],
- 'deployment_uuid' => $this->deploymentUuid,
- 'environment_name' => $this->parameters['environment_name'],
- ]);
- }
-
- public function stop()
- {
- instant_remote_process(["docker rm -f {$this->application->uuid}"], $this->application->destination->server);
- $this->application->status = 'stopped';
- $this->application->save();
- $this->emit('applicationStatusChanged');
- }
-
- public function pollStatus()
- {
- dispatch(new ApplicationContainerStatusJob(
- application: $this->application,
- container_name: generate_container_name($this->application->uuid),
- ));
- }
-}
diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php
index 9db650e241..72f64b58ac 100644
--- a/resources/views/livewire/project/application/general.blade.php
+++ b/resources/views/livewire/project/application/general.blade.php
@@ -68,9 +68,6 @@
<div class="flex flex-col">
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
-
- <x-forms.checkbox helper="More logs will be visible during a deployment." instantSave id="is_debug_enabled"
- label="Debug" />
<x-forms.checkbox
helper="Your application will be available only on https if your domain starts with https://..."
instantSave id="is_force_https_enabled" label="Force Https" />