diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 0b89ac0dc..8b2d2f876 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -69,7 +69,6 @@ public function new() if ($type->startsWith('one-click-service-') && !is_null( (int)$server_id)) { $oneClickServiceName = $type->after('one-click-service-')->value(); $oneClickService = data_get($services, "$oneClickServiceName.compose"); - ray($oneClickServiceName); $oneClickDotEnvs = data_get($services, "$oneClickServiceName.envs", null); if ($oneClickDotEnvs) { $oneClickDotEnvs = Str::of(base64_decode($oneClickDotEnvs))->split('/\r\n|\r|\n/'); diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 0726d66e5..95cfe232e 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -233,7 +233,7 @@ private function deploy_simple_dockerfile() ); $this->build_image_name = Str::lower("{$this->application->git_repository}:build"); $this->production_image_name = Str::lower("{$this->application->uuid}:latest"); - ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); + // ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); $this->generate_compose_file(); $this->generate_build_env_variables(); $this->add_build_env_variables_to_dockerfile(); @@ -258,7 +258,7 @@ private function deploy() $this->build_image_name = Str::lower("{$this->application->git_repository}:{$tag}-build"); $this->production_image_name = Str::lower("{$this->application->uuid}:{$tag}"); - ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); + // ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); if (!$this->force_rebuild) { $this->execute_remote_command([ @@ -307,7 +307,7 @@ private function health_check() $this->newVersionIsHealthy = true; return; } - ray('New container name: ', $this->container_name); + // ray('New container name: ', $this->container_name); if ($this->container_name) { $counter = 0; $this->execute_remote_command( @@ -354,7 +354,7 @@ private function deploy_pull_request() { $this->build_image_name = Str::lower("{$this->application->uuid}:pr-{$this->pull_request_id}-build"); $this->production_image_name = Str::lower("{$this->application->uuid}:pr-{$this->pull_request_id}"); - ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); + // ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green(); $this->execute_remote_command([ "echo 'Starting pull request (#{$this->pull_request_id}) deployment of {$this->application->git_repository}:{$this->application->git_branch}.'", ]); @@ -628,14 +628,14 @@ private function generate_local_persistent_volumes_only_volume_names() private function generate_environment_variables($ports) { $environment_variables = collect(); - ray('Generate Environment Variables')->green(); + // ray('Generate Environment Variables')->green(); if ($this->pull_request_id === 0) { - ray($this->application->runtime_environment_variables)->green(); + // ray($this->application->runtime_environment_variables)->green(); foreach ($this->application->runtime_environment_variables as $env) { $environment_variables->push("$env->key=$env->value"); } } else { - ray($this->application->runtime_environment_variables_preview)->green(); + // ray($this->application->runtime_environment_variables_preview)->green(); foreach ($this->application->runtime_environment_variables_preview as $env) { $environment_variables->push("$env->key=$env->value"); } diff --git a/app/Models/Service.php b/app/Models/Service.php index 30e292945..703911162 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -540,7 +540,7 @@ public function parse(bool $isNew = false): Collection $serviceLabels = $serviceLabels->merge($defaultLabels); if (!$isDatabase && $fqdns->count() > 0) { if ($fqdns) { - $serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik($fqdns, $containerName, true)); + $serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik($fqdns, true)); } } data_set($service, 'labels', $serviceLabels->toArray()); diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index 142754801..2b779480f 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -1,12 +1,12 @@ push('traefik.enable=true'); foreach ($domains as $domain) { + $uuid = (string)new Cuid2(7); $url = Url::fromString($domain); $host = $url->getHost(); $path = $url->getPath(); $schema = $url->getScheme(); $port = $url->getPort(); - $http_label = "{$container_name}-http"; - $https_label = "{$container_name}-https"; - if ($port) { - $http_label = "{$http_label}-{$port}"; - $https_label = "{$https_label}-{$port}"; - } + $http_label = "{$uuid}-http"; + $https_label = "{$uuid}-https"; + if ($schema === 'https') { // Set labels for https $labels->push("traefik.http.routers.{$https_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"); @@ -223,7 +221,7 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview $domains = Str::of(data_get($application, 'fqdn'))->explode(','); } // Add Traefik labels no matter which proxy is selected - $labels = $labels->merge(fqdnLabelsForTraefik($domains, $container_name, $application->settings->is_force_https_enabled)); + $labels = $labels->merge(fqdnLabelsForTraefik($domains, $application->settings->is_force_https_enabled)); } return $labels->all(); } diff --git a/config/sentry.php b/config/sentry.php index abbd727b5..63f22b62c 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // 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.65', + 'release' => '4.0.0-beta.66', // 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 e13d2a071..b8ce765c5 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@