fix: set deployment failed if new container is not healthy

This commit is contained in:
Andras Bacsai 2024-01-02 21:07:16 +01:00
parent ea271ca079
commit 53965ab8ed

View File

@ -1295,6 +1295,9 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
});
} else {
$this->application_deployment_queue->addLogEntry("New container is not healthy, rolling back to the old container.");
$this->application_deployment_queue->update([
'status' => ApplicationDeploymentStatus::FAILED->value,
]);
$this->execute_remote_command(
[executeInDocker($this->deployment_uuid, "docker rm -f $this->container_name >/dev/null 2>&1"), "hidden" => true, "ignore_errors" => true],
);