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
fix: always rebuild Dockerfile / dockerimage buildpacks
Andras Bacsai132807b55d4a
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex 0c6b6eecb3..3560069839 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -234,7 +234,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted$this->build_server = $this->server;$this->original_server = $this->server;}- if ($this->restart_only && $this->application->build_pack !== 'dockerimage') {+ if ($this->restart_only && $this->application->build_pack !== 'dockerimage' && $this->application->build_pack !== 'dockerfile') {$this->just_restart();if ($this->server->isProxyShouldRun()) {dispatch(new ContainerStatusJob($this->server));@@ -326,17 +326,19 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted],);$this->generate_image_names();- if (!$this->force_rebuild) {- $this->check_image_locally_or_remotely();- if (str($this->saved_outputs->get('local_image_found'))->isNotEmpty() && !$this->application->isConfigurationChanged()) {- $this->create_workdir();- $this->application_deployment_queue->addLogEntry("No configuration changed & image found ({$this->production_image_name}) with the same Git Commit SHA. Build step skipped.");- $this->generate_compose_file();- $this->push_to_docker_registry();- $this->rolling_update();- return;- }- }++ // Always rebuild dockerfile based container.+ // if (!$this->force_rebuild) {+ // $this->check_image_locally_or_remotely();+ // if (str($this->saved_outputs->get('local_image_found'))->isNotEmpty() && !$this->application->isConfigurationChanged()) {+ // $this->create_workdir();+ // $this->application_deployment_queue->addLogEntry("No configuration changed & image found ({$this->production_image_name}) with the same Git Commit SHA. Build step skipped.");+ // $this->generate_compose_file();+ // $this->push_to_docker_registry();+ // $this->rolling_update();+ // return;+ // }+ // }$this->generate_compose_file();$this->generate_build_env_variables();$this->add_build_env_variables_to_dockerfile();@@ -467,17 +469,17 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted$this->set_base_dir();$this->generate_image_names();$this->clone_repository();- if (!$this->force_rebuild) {- $this->check_image_locally_or_remotely();- if (str($this->saved_outputs->get('local_image_found'))->isNotEmpty() && !$this->application->isConfigurationChanged()) {- $this->create_workdir();- $this->application_deployment_queue->addLogEntry("No configuration changed & image found ({$this->production_image_name}) with the same Git Commit SHA. Build step skipped.");- $this->generate_compose_file();- $this->push_to_docker_registry();- $this->rolling_update();- return;- }- }+ // if (!$this->force_rebuild) {+ // $this->check_image_locally_or_remotely();+ // if (str($this->saved_outputs->get('local_image_found'))->isNotEmpty() && !$this->application->isConfigurationChanged()) {+ // $this->create_workdir();+ // $this->application_deployment_queue->addLogEntry("No configuration changed & image found ({$this->production_image_name}) with the same Git Commit SHA. Build step skipped.");+ // $this->generate_compose_file();+ // $this->push_to_docker_registry();+ // $this->rolling_update();+ // return;+ // }+ // }$this->cleanup_git();$this->generate_compose_file();$this->generate_build_env_variables();diff --git a/resources/views/livewire/project/application/deployment/show.blade.php b/resources/views/livewire/project/application/deployment/show.blade.phpindex 1426ef5837..1d3455605c 100644--- a/resources/views/livewire/project/application/deployment/show.blade.php+++ b/resources/views/livewire/project/application/deployment/show.blade.php@@ -87,7 +87,7 @@<div @class(['font-mono','dark:text-warning whitespace-pre-line' => $line['hidden'],- 'text-red-500 whitespace-pre-line' => $line['type'] == 'stderr',+ 'text-red-500 font-bold whitespace-pre-line' => $line['type'] == 'stderr',])>[{{ $line['timestamp'] }}] @if ($line['hidden'])<br>COMMAND: <br>{{ $line['command'] }} <br><br>OUTPUT:@endif @if (str($line['output'])->contains('http://') || str($line['output'])->contains('https://'))