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.

fix: use latest image if nothing is specified

Andras Bacsai7233c86f3d03
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index f37ee5e496..f3e8c4129a 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -333,7 +333,11 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
private function deploy_dockerimage_buildpack()
{
$this->dockerImage = $this->application->docker_registry_image_name;
- $this->dockerImageTag = $this->application->docker_registry_image_tag;
+ if (str($this->application->docker_registry_image_tag)->isEmpty()) {
+ $this->dockerImageTag = 'latest';
+ } else {
+ $this->dockerImageTag = $this->application->docker_registry_image_tag;
+ }
ray("echo 'Starting deployment of {$this->dockerImage}:{$this->dockerImageTag} to {$this->server->name}.'");
$this->application_deployment_queue->addLogEntry("Starting deployment of {$this->dockerImage}:{$this->dockerImageTag} to {$this->server->name}.");
$this->generate_image_names();
diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php
index 732be62d05..37b6502813 100644
--- a/app/Livewire/Project/Application/General.php
+++ b/app/Livewire/Project/Application/General.php
@@ -232,7 +232,6 @@ class General extends Component
if (data_get($this->application, 'build_pack') === 'dockerimage') {
$this->validate([
'application.docker_registry_image_name' => 'required',
- 'application.docker_registry_image_tag' => 'required',
]);
}
if (data_get($this->application, 'fqdn')) {