From 4a3ef91dd07d22748461fd7f3a639ba9dc26f0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Mon, 26 Oct 2026 09:48:17 +0100 Subject: [PATCH] chore: fileadmin is a shared dir of the TYPO3 13 deployment fileadmin moves from the TYPO3 10 release (ep-reisen-typo3/shared/public/fileadmin) to ep-reisen-typo3-13/shared/public/fileadmin, so Deployer links it like the other shared dirs (relative symlink) and the typo3:fileadmin task with its absolute fileadmin_path goes. deploy:shared creates a missing shared dir empty, which would leave the sites without any file: deploy:check:fileadmin aborts the deploy before anything happens on the server if the shared fileadmin is missing. Deploy this only after the directory has been moved. Co-Authored-By: Claude Opus 5.5 --- deploy.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy.php b/deploy.php index 8ac8e01..e2761a3 100644 --- a/deploy.php +++ b/deploy.php @@ -11,10 +11,8 @@ set('cachetool_url', 'https://github.com/gordalina/cachetool/releases/download/1 set('application', 'ep-reisen-typo3-13'); set('keep_releases', 3); -// fileadmin of the TYPO3 10 release until it is moved into shared/ (plan 4a, tidy up step 2) -set('fileadmin_path', '/usr/home/eptypo3/public_html/ep-reisen-typo3/shared/public/fileadmin'); - set('shared_dirs', [ + '{{typo3/public_dir}}/fileadmin', '{{typo3/public_dir}}/typo3temp/assets', 'var/lock', 'var/log', @@ -91,9 +89,11 @@ task('deploy:build', function () { runLocally('ddev exec bash -c "cd var/deploy-build && composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader"'); })->once(); -task('typo3:fileadmin', function () { - // Relative (-r), like Deployer's shared dirs: the vhosts answer 403 for an absolute symlink here - run('ln -sfnr {{fileadmin_path}} {{release_path}}/{{typo3/public_dir}}/fileadmin'); +// deploy:shared would create a missing shared dir empty, and the sites would lose every file +task('deploy:check:fileadmin', function () { + if (!test('[ -d {{deploy_path}}/shared/{{typo3/public_dir}}/fileadmin ]')) { + throw new \RuntimeException(parse('{{deploy_path}}/shared/{{typo3/public_dir}}/fileadmin is missing')); + } }); // current_path instead of the recipe's release_path, so it also works after a rollback @@ -103,6 +103,7 @@ task('typo3:cache:flush', function () { task('deploy', [ 'deploy:info', + 'deploy:check:fileadmin', // Build locally first, so a failing build aborts before the server is touched at all. 'deploy:build', 'deploy:setup', @@ -110,7 +111,6 @@ task('deploy', [ 'deploy:release', 'rsync', 'deploy:shared', - 'typo3:fileadmin', 'deploy:writable', // The schema has to exist before the new code starts serving traffic. 'typo3:extension:setup',