diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index b87f82bd7..6281f45dd 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -104,13 +104,15 @@ class General extends Component } public function mount() { - $this->is_static = $this->application->settings->is_static; - $this->is_git_submodules_enabled = $this->application->settings->is_git_submodules_enabled; - $this->is_git_lfs_enabled = $this->application->settings->is_git_lfs_enabled; - $this->is_debug_enabled = $this->application->settings->is_debug_enabled; - $this->is_preview_deployments_enabled = $this->application->settings->is_preview_deployments_enabled; - $this->is_auto_deploy_enabled = $this->application->settings->is_auto_deploy_enabled; - $this->is_force_https_enabled = $this->application->settings->is_force_https_enabled; + if (data_get($this->application,'settings')) { + $this->is_static = $this->application->settings->is_static; + $this->is_git_submodules_enabled = $this->application->settings->is_git_submodules_enabled; + $this->is_git_lfs_enabled = $this->application->settings->is_git_lfs_enabled; + $this->is_debug_enabled = $this->application->settings->is_debug_enabled; + $this->is_preview_deployments_enabled = $this->application->settings->is_preview_deployments_enabled; + $this->is_auto_deploy_enabled = $this->application->settings->is_auto_deploy_enabled; + $this->is_force_https_enabled = $this->application->settings->is_force_https_enabled; + } } public function submit() diff --git a/app/Http/Livewire/Project/New/SimpleDockerfile.php b/app/Http/Livewire/Project/New/SimpleDockerfile.php index be65475a3..8a1d2c024 100644 --- a/app/Http/Livewire/Project/New/SimpleDockerfile.php +++ b/app/Http/Livewire/Project/New/SimpleDockerfile.php @@ -45,6 +45,9 @@ CMD ["nginx", "-g", "daemon off;"] $environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first(); $port = get_port_from_dockerfile($this->dockerfile); + if (!$port) { + $port = 80; + } $application = Application::create([ 'name' => 'dockerfile-' . new Cuid2(7), 'repository_project_id' => 0, diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index fdb682a72..e22a3596c 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -113,7 +113,7 @@ function generateApplicationContainerName(Application $application, $pull_reques return $application->uuid . '-' . $now; } } -function get_port_from_dockerfile($dockerfile): int +function get_port_from_dockerfile($dockerfile): int|null { $dockerfile_array = explode("\n", $dockerfile); $found_exposed_port = null; @@ -127,7 +127,7 @@ function get_port_from_dockerfile($dockerfile): int if ($found_exposed_port) { return (int)$found_exposed_port->value(); } - return 80; + return null; } function defaultLabels($id, $name, $pull_request_id = 0, string $type = 'application', $subType = null, $subId = null) diff --git a/config/sentry.php b/config/sentry.php index 788868730..58b909f0a 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.54', + 'release' => '4.0.0-beta.55', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 209bb48f3..c70227f5a 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@