Skip to content

Commit 893339f

Browse files
committed
refactor: Update Docker Compose build command to include --pull flag
1 parent 356e7b5 commit 893339f

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

app/Jobs/ApplicationDeploymentJob.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ private function deploy_docker_compose_buildpack()
462462
if ($this->env_filename) {
463463
$command .= " --env-file {$this->workdir}/{$this->env_filename}";
464464
}
465-
$command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build";
465+
$command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build --pull";
466466
$this->execute_remote_command(
467467
[executeInDocker($this->deployment_uuid, $command), 'hidden' => true],
468468
);
@@ -2031,23 +2031,6 @@ private function stop_running_container(bool $force = false)
20312031
}
20322032
}
20332033

2034-
private function build_by_compose_file()
2035-
{
2036-
$this->application_deployment_queue->addLogEntry('Pulling & building required images.');
2037-
if ($this->application->build_pack === 'dockerimage') {
2038-
$this->application_deployment_queue->addLogEntry('Pulling latest images from the registry.');
2039-
$this->execute_remote_command(
2040-
[executeInDocker($this->deployment_uuid, "docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} pull"), 'hidden' => true],
2041-
[executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} build"), 'hidden' => true],
2042-
);
2043-
} else {
2044-
$this->execute_remote_command(
2045-
[executeInDocker($this->deployment_uuid, "{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build"), 'hidden' => true],
2046-
);
2047-
}
2048-
$this->application_deployment_queue->addLogEntry('New images built.');
2049-
}
2050-
20512034
private function start_by_compose_file()
20522035
{
20532036
if ($this->application->build_pack === 'dockerimage') {

0 commit comments

Comments
 (0)