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 git clone command for deploy key + docker compose.

Stuart Rowlandsd9599da4a86f
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 43352b8671..7a2144fc2f 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -862,6 +862,10 @@ class Application extends BaseModel
if (!$only_checkout) {
$git_clone_command = $this->setGitImportSettings($deployment_uuid, $git_clone_command_base);
}
+ else {
+ $git_clone_command = "git clone {$fullRepoUrl} -b {$this->git_branch} {$baseDir}";
+ }
+
if ($exec_in_docker) {
$commands = collect([
executeInDocker($deployment_uuid, "mkdir -p /root/.ssh"),
@@ -979,6 +983,7 @@ class Application extends BaseModel
// $fileList->push(".$prComposeFile");
// }
$commands = collect([
+ "rm -rf /tmp/{$uuid}",
"mkdir -p /tmp/{$uuid} && cd /tmp/{$uuid}",
$cloneCommand,
"git sparse-checkout init --cone",