From 6ff308015a5909400b13d6e80aca21b23939925f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 15 Sep 2026 11:38:56 +0200 Subject: [PATCH] chore: optimize deployer config --- deploy.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/deploy.php b/deploy.php index 933b027d..45a001f8 100644 --- a/deploy.php +++ b/deploy.php @@ -63,41 +63,39 @@ host('prod') ->setForwardAgent(true) ->setSshMultiplexing(true) ->setDeployPath('/usr/home/eptypo3/public_html/{{application}}') - ->set('buspronet_path', '/usr/home/eptypo3/public_html/kuschick/buspronet/buspronet') ->set('bin/php', '/usr/bin/php74') ->set('http_user', 'eptypo3') ->set('writable_mode', 'chmod') - ->set('bin/composer', '/usr/bin/composer') - ->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader') ->set('rsync_src', __DIR__) ->set('rsync', $rsyncOptions) - ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/public/ --web-url=https://www.ep-reisen.de') + ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/{{typo3_webroot}}/ --web-url=https://www.ep-reisen.de') ; task('deploy', [ 'deploy:info', + // Build locally first, so a failing build aborts before the server is touched at all. + 'deploy:assets:build', 'deploy:setup', 'deploy:lock', 'deploy:release', - 'deploy:assets:build', 'rsync', 'deploy:shared', 'deploy:writable', + // The schema has to exist before the new code starts serving traffic. 'typo3:database:migrate', 'typo3:language:update', + // deploy:publish == deploy:symlink, deploy:unlock, deploy:cleanup, deploy:success 'deploy:publish', - 'cachetool:clear:opcache', - 'typo3:cache:flush', - 'deploy:buspronet:symlink', ]); -task('deploy:buspronet:symlink', function () { - run('ln -s {{buspronet_path}} {{release_or_current_path}}/public/buchung'); -}); +// Caches belong to the release that goes live, so they are cleared after the symlink flip. Hooking +// into deploy:symlink rather than appending to the list above keeps them inside deploy:publish, ahead +// of deploy:unlock and deploy:success - a failing cache task must not follow a declared success. +after('deploy:symlink', 'cachetool:clear:opcache'); +after('deploy:symlink', 'typo3:cache:flush'); task ('deploy:assets:build', function () { runLocally('ddev exec npm ci'); - runLocally('ddev exec npm rebuild node-sass'); runLocally('ddev exec npm run build'); });