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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Merge remote-tracking branch 'origin/next' into 7765-healthcheck-investigation
Andras Bacsai65d4005493e1
diff --cc app/Jobs/ApplicationDeploymentJob.phpindex 9b83357a7a,2c04201445..be74cd1fb0--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@@ -2756,18 -2755,10 +2756,18 @@@ class ApplicationDeploymentJob implemenprivate function generate_healthcheck_commands(){+ // Handle CMD type healthcheck+ if ($this->application->health_check_type === 'cmd' && ! empty($this->application->health_check_command)) {+ $this->full_healthcheck_url = $this->application->health_check_command;++ return $this->application->health_check_command;+ }++ // HTTP type healthcheck (default)if (! $this->application->health_check_port) {- $health_check_port = $this->application->ports_exposes_array[0];+ $health_check_port = (int) $this->application->ports_exposes_array[0];} else {- $health_check_port = $this->application->health_check_port;+ $health_check_port = (int) $this->application->health_check_port;}if ($this->application->settings->is_static || $this->application->build_pack === 'static') {$health_check_port = 80;diff --cc app/Livewire/Project/Shared/HealthChecks.phpindex ac25f6a771,df2de51424..3460b6c2c0--- a/app/Livewire/Project/Shared/HealthChecks.php+++ b/app/Livewire/Project/Shared/HealthChecks.php@@@ -16,25 -16,19 +16,25 @@@ class HealthChecks extends Componen#[Validate(['boolean'])]public bool $healthCheckEnabled = false;+ #[Validate(['string', 'in:http,cmd'])]+ public string $healthCheckType = 'http';++ #[Validate(['nullable', 'required_if:healthCheckType,cmd', 'string'])]+ public ?string $healthCheckCommand = null;+- #[Validate(['string'])]+ #[Validate(['required', 'string', 'in:GET,HEAD,POST,OPTIONS'])]public string $healthCheckMethod;- #[Validate(['string'])]+ #[Validate(['required', 'string', 'in:http,https'])]public string $healthCheckScheme;- #[Validate(['string'])]+ #[Validate(['required', 'string', 'regex:/^[a-zA-Z0-9.\-_]+$/'])]public string $healthCheckHost;- #[Validate(['nullable', 'string'])]+ #[Validate(['nullable', 'integer', 'min:1', 'max:65535'])]public ?string $healthCheckPort = null;- #[Validate(['string'])]+ #[Validate(['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'])]public string $healthCheckPath;#[Validate(['integer'])]@@@ -60,14 -54,12 +60,14 @@@protected $rules = ['healthCheckEnabled' => 'boolean',+ 'healthCheckType' => 'string|in:http,cmd',+ 'healthCheckCommand' => 'nullable|string',- 'healthCheckPath' => 'string',- 'healthCheckPort' => 'nullable|string',- 'healthCheckHost' => 'string',- 'healthCheckMethod' => 'string',+ 'healthCheckPath' => ['required', 'string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'],+ 'healthCheckPort' => 'nullable|integer|min:1|max:65535',+ 'healthCheckHost' => ['required', 'string', 'regex:/^[a-zA-Z0-9.\-_]+$/'],+ 'healthCheckMethod' => 'required|string|in:GET,HEAD,POST,OPTIONS','healthCheckReturnCode' => 'integer',- 'healthCheckScheme' => 'string',+ 'healthCheckScheme' => 'required|string|in:http,https','healthCheckResponseText' => 'nullable|string','healthCheckInterval' => 'integer|min:1','healthCheckTimeout' => 'integer|min:1',