From 5afafdcab7f29e3eb3ea537f659153e5116f414f Mon Sep 17 00:00:00 2001 From: Midhun Monachan Date: Sun, 19 May 2024 03:30:27 -0400 Subject: [PATCH 1/3] Hotfix: Fixed file read error in website.php Moved the directory creation and ownership setting code before the file read operation to prevent the file read error. --- recipe/provision/website.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipe/provision/website.php b/recipe/provision/website.php index 812f1eea0..2807e3318 100644 --- a/recipe/provision/website.php +++ b/recipe/provision/website.php @@ -1,4 +1,7 @@ -verbose(); - From bf55075efbe40b8c0af542a51af69f127646d452 Mon Sep 17 00:00:00 2001 From: Midhun Monachan Date: Sun, 19 May 2024 03:50:00 -0400 Subject: [PATCH 2/3] Hotfix: Adjusted Caddyfile path and ensured its inclusion in build --- bin/build | 7 +++++-- recipe/provision/website.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/build b/bin/build index 9e159f7fc..621eb21e6 100755 --- a/bin/build +++ b/bin/build @@ -70,7 +70,9 @@ foreach ($iterator as $fileInfo) { // Add schema.json echo "Add file: /src/schema.json\n"; $phar->addFile(realpath(__DIR__ . '/../src/schema.json'), '/src/schema.json'); - +// Add Caddyfile +echo "Add file: /Caddyfile\n"; +$phar->addFile(realpath(__DIR__ . '/../recipe/provision/Caddyfile'), '/recipe/provision/Caddyfile'); // Add bin/dep file echo "Add file: /bin/dep\n"; $depContent = file_get_contents(__ROOT__ . '/bin/dep'); @@ -78,7 +80,8 @@ $depContent = str_replace("#!/usr/bin/env php\n", '', $depContent); $depContent = str_replace('__FILE__', 'str_replace("phar://", "", Phar::running())', $depContent); $depContent = preg_replace("/run\('.+?'/", "run('$version'", $depContent); $phar->addFromString('bin/dep', $depContent); -$phar->setStub(<<setStub( + << Caddyfile.new"); From 4dacf8dd3522ce4d29d8641944de6b2950380c9e Mon Sep 17 00:00:00 2001 From: Midhun Monachan Date: Sun, 19 May 2024 03:52:16 -0400 Subject: [PATCH 3/3] Regenerate docs using php bin/docgen --- docs/recipe/provision/website.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/recipe/provision/website.md b/docs/recipe/provision/website.md index a6aee65dd..4a4c7bd94 100644 --- a/docs/recipe/provision/website.md +++ b/docs/recipe/provision/website.md @@ -13,7 +13,7 @@ require 'recipe/provision/website.php'; ## Configuration ### domain -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L4) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L7) @@ -23,7 +23,7 @@ return ask(' Domain: '); ### public_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L8) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L11) @@ -36,7 +36,7 @@ return ask(' Public path: ', 'public'); ## Tasks ### provision:website -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L13) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L16) Provision website. @@ -44,7 +44,7 @@ Provision website. ### logs:caddy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L54) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L56) Shows caddy logs. @@ -52,7 +52,7 @@ Shows caddy logs. ### logs:caddy:syslog -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L59) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L61) Shows caddy syslog.