Moin zusammen,
ich habe mir ein schon recht gut funktionierendes Deployment über Github für TYPO3 v13.4 eingerichtet.
Mein Problem dabei ist, dass ich als angemeldeter Maintainer der Seite einen 500er beim Dashboard bekomme. Die Fehlermeldung lautet:
`Anscheinend gibt es ein Problem mit dieser Website
https://beta.domain.de/typo3/module/dashboard?token=922010fc3aef5936510011d445b13eab9f6cf5df hat möglicherweise ein temporäres Problem oder ist umgezogen.
Fehlercode: 500 Internal Server Error
- Die Website könnte vorübergehend nicht erreichbar sein, versuchen Sie es bitte später nochmals.`
Meine deploy.phpsieht so aus:
<?php
declare(strict_types=1);
namespace Deployer;
// Include base recipes
require 'recipe/common.php';
require 'contrib/cachetool.php';
require 'contrib/rsync.php';
// Include hosts
import('.hosts.yml');
set('http_user', '4096');
set('http_group', 'power');
set('php', '/usr/bin/php');
set('bin/typo3', '{{release_path}}/vendor/bin/typo3');
// Set maximum number of releases
set('keep_releases', 5);
// Set TYPO3 docroot
set('typo3_webroot', 'public');
// Set shared directories
$sharedDirectories = [
'{{typo3_webroot}}/fileadmin',
'{{typo3_webroot}}/typo3temp',
];
set('shared_dirs', $sharedDirectories);
// Set shared files
$sharedFiles = [
'{{typo3_webroot}}/.htaccess',
// 'config/system/additional.php',
'config/system/settings.php',
'composer.phar',
];
set('shared_files', $sharedFiles);
// Define all rsync excludes
$exclude = [
// OS specific files
'.DS_Store',
'Thumbs.db',
// Project specific files and directories
'.ddev',
'.editorconfig',
'.fleet',
'.git*',
'.idea',
'.php-cs-fixer.dist.php',
'.vscode',
'auth.json',
'deploy.php',
'.hosts.yml',
'.hosts.yaml',
'gitlab-ci.yml',
'phpstan.neon',
'phpunit.xml',
'README*',
'rector.php',
'typoscript-lint.yml',
'/.deployment',
'/var',
'/**/Tests/*',
'node_modules',
'tests',
'.pa11yci',
'qodana.yaml',
'Readme-Deployer.md'
];
// Define rsync options
set('rsync', [
'exclude' => array_merge($sharedDirectories, $sharedFiles, $exclude),
'exclude-file' => false,
'include' => [],
'include-file' => false,
'filter' => [],
'filter-file' => false,
'filter-perdir' => false,
'flags' => 'az',
'options' => ['delete'],
'timeout' => 300,
]);
set('rsync_src', './');
// Use rsync to update code during deployment
task('deploy:update_code', function () {
invoke('rsync:warmup');
invoke('rsync');
});
// TYPO3 tasks
desc('Flush all caches');
task('typo3:cache_flush', function () {
run('{{bin/typo3}} cache:flush');
});
desc('Warm up caches');
task('typo3:cache_warmup', function () {
run('{{bin/typo3}} cache:warmup');
});
desc('Set up all installed extensions');
task('typo3:extension_setup', function () {
run('{{bin/typo3}} extension:setup');
});
desc('Fix folder structure');
task('typo3:fix_folder_structure', function () {
run('{{bin/typo3}} install:fixfolderstructure');
});
desc('Update language files');
task('typo3:language_update', function () {
run('{{bin/typo3}} language:update');
});
desc('Update databse schema');
task('typo3:update_database', function () {
run("{{bin/typo3}} database:updateschema '*.add,*.change'");
});
desc('Update reference index');
task('typo3:update_reference_index', function () {
run("{{bin/typo3}} referenceindex:update");
});
desc('Execute upgrade wizards');
task('typo3:upgrade_all', function () {
run('{{bin/typo3}} upgrade:prepare');
run('{{bin/typo3}} upgrade:run all --confirm all');
});
// add own settings
desc('backend lock');
task('typo3:backend_lock', function () {
run("{{bin/typo3}} backend:lock");
});
desc('backend unlock');
task('typo3:backend_unlock', function () {
run("{{bin/typo3}} backend:unlock");
});
desc('cleanup deletedrecords');
task('typo3:cleanup_deletedrecords', function () {
run("{{bin/typo3}} cleanup:deletedrecords");
});
desc('redirects checkintegrity');
task('typo3:redirect_checkintegrity', function () {
run("{{bin/typo3}} redirects:checkintegrity");
});
desc('redirects cleanup');
task('typo3:redirect_cleanup', function () {
run("{{bin/typo3}} redirects:cleanup");
});
desc('referenceindex update');
task('typo3:referenceindex_update', function () {
run("{{bin/typo3}} referenceindex:update");
});
// do it before the release
desc('composer install');
task('composer_install', function () {
run("composer install");
});
// do it before the release
desc('cache warmup');
task('typo3:cache_warmup', function () {
run("{{bin/typo3}} cache:warmup --group system");
});
// do it after the release
desc('cache warmup group pages');
task('typo3:cache_warmup_group_pages', function () {
run("{{bin/typo3}} cache:flush --group pages");
});
// Hoster spezifisch!
desc('correct permissions');
task('correct_permissions', function () {
run('find {{release_path}} -type d -not -path "{{release_path}}/vendor/bin*" -print0 | xargs -0 chmod 0755');
run('find {{release_path}} -type f -not -path "{{release_path}}/vendor/bin*" -print0 | xargs -0 chmod 0644');
});
// Register TYPO3 tasks
// bevor der Symlink umgeschaltet wird
before('deploy:symlink', function () {
invoke('typo3:backend_lock');
// invoke('composer_install');
invoke('correct_permissions');
invoke('typo3:fix_folder_structure');
// invoke('typo3:extension_setup');
invoke('typo3:update_database');
invoke('typo3:update_reference_index');
invoke('typo3:language_update');
invoke('typo3:cache_warmup');
// invoke('typo3:upgrade_all');
});
// nachdem der Symlink umgeschaltet wurde
after('deploy:symlink', function () {
invoke('typo3:cache_flush');
// invoke('typo3:cache_warmup_group_pages');
invoke('typo3:backend_unlock');
});
// Main deployment task
desc('Deploy TYPO3');
task('deploy', [
'deploy:prepare',
'deploy:publish',
]);
// Unlock on failed deployment
after('deploy:failed', 'deploy:unlock');
Das Deployment selbst läuft fehlerfrei bei Github durch. 🤔
- Provider ist Alfahosting, Business XL v2
- PHP8.3
- Apache
- TYPO3 v13.4.18
Den Cache im Modul Maintanace oder im Terminal mit vendor/bin/typo3 cache:flush zu löschen, hilft leider nicht.
Hat jemand einen TIpp für mich, wie ich es hinbekomme dass es sauber läuft?
Besten Dank, Steffen