From 9e189e3dcc7494b2a57b4956136682fb9ea83cb8 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Fri, 3 Nov 2023 08:34:46 +0100 Subject: [PATCH 1/2] Set http_user automatically --- src/Recipes/AppRecipe.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Recipes/AppRecipe.php b/src/Recipes/AppRecipe.php index bc4f19c..63f1a5f 100644 --- a/src/Recipes/AppRecipe.php +++ b/src/Recipes/AppRecipe.php @@ -159,6 +159,10 @@ public static function discover(): void // Override the default setting, which might try to respect the {{php_version}} setting. currentHost()->set('bin/php', '/usr/bin/php'); + + // Set the http_user to the project user name, as Deployer might not be able + // to figure it out on its own. + currentHost()->set('http_user', $project->getShortId()); } public static function assertDocumentRoot(): void From 2be8e74e75576a539798828840c290a7c2aaa0c7 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Fri, 3 Nov 2023 08:37:02 +0100 Subject: [PATCH 2/2] Also set writable_mode --- src/Recipes/AppRecipe.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Recipes/AppRecipe.php b/src/Recipes/AppRecipe.php index 63f1a5f..e20cb49 100644 --- a/src/Recipes/AppRecipe.php +++ b/src/Recipes/AppRecipe.php @@ -163,6 +163,7 @@ public static function discover(): void // Set the http_user to the project user name, as Deployer might not be able // to figure it out on its own. currentHost()->set('http_user', $project->getShortId()); + currentHost()->set('writable_mode', 'chmod'); } public static function assertDocumentRoot(): void