[ '.ddev', '.claude', '.DS_Store', '.git', '.github', '.idea', '.nvmrc', 'node_modules', 'public/fileadmin', 'public/typo3temp', 'public/uploads', 'var', '.editorconfig', '.gitignore', 'deploy.php', 'package.json', 'package-lock.json', 'postcss.config.js', 'tailwind.config.js', 'webpack.config.js', ], 'exclude-file' => false, 'include' => [], 'include-file' => false, 'filter' => [], 'filter-file' => false, 'filter-perdir' => false, // -t preserves mtimes: without it every file lands with a fresh timestamp, so unchanged // files get a new Last-Modified on every deploy and every conditional request revalidates // into a full response instead of a 304. 'flags' => 'rzt', 'options' => ['delete', 'links', 'chmod=D755,F664'], 'timeout' => 300, ]; host('prod') ->setHostname('dedi10193.your-server.de') ->setRemoteUser('eptypo3') ->setForwardAgent(true) ->setSshMultiplexing(true) ->setDeployPath('/usr/home/eptypo3/public_html/{{application}}') ->set('bin/php', '/usr/bin/php74') ->set('http_user', 'eptypo3') ->set('writable_mode', 'chmod') ->set('rsync_src', __DIR__) ->set('rsync', $rsyncOptions) // The temp script goes into the shared typo3temp, which resolves to the same directory from every // release: PHP workers with a stale realpath cache still map "current" to the previous release and // would 404 on a script placed inside the new one. ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{deploy_path}}/shared/{{typo3_webroot}}/typo3temp/ --web-url=https://www.ep-reisen.de/typo3temp') ; 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', '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', ]); // 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 run build'); }); task('typo3:database:migrate', function () { run('{{bin/php}} {{release_or_current_path}}/vendor/bin/typo3cms database:updateschema'); }); task('typo3:language:update', function () { run('{{bin/php}} {{release_or_current_path}}/vendor/bin/typo3cms language:update'); }); task('typo3:cache:flush', function () { run('{{bin/php}} {{release_or_current_path}}/vendor/bin/typo3cms cache:flush'); }); after('deploy:failed', 'deploy:unlock');