Hallo Wolfgang,
zuerst einmal danke für eure Antworten. Ich nehme an dass die deploy.php , .gitlab-ci.yml, gemeint ist. Zur Sicherheit poste ich auch mal die settings.php mit dazu.
das ist meine deploy.php:
<?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', '');
set('http_group', 'psacln');
set('/opt/alt/php83/usr/bin/php', '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',
];
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',
'phpstan.neon',
'phpunit.xml',
'README',
'rector.php',
'typoscript-lint.yml',
'/.deployment',
'/var',
'/**/Tests/*',
];
// 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 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');
});
// Register TYPO3 tasks
before('deploy:symlink', function () {
//invoke('typo3:fix_folder_structure');
invoke('typo3:language_update');
});
after('deploy:symlink', function () {
invoke('typo3:extension_setup');
invoke('typo3:update_reference_index');
//invoke('typo3:upgrade_all');
invoke('typo3:cache_flush');
invoke('typo3:cache_warmup');
});
// Main deployment task
desc('Deploy TYPO3 project');
task('deploy', [
'deploy:prepare',
'deploy:publish',
]);
// Unlock on failed deployment
after('deploy:failed', 'deploy:unlock');
Meine .gitlab-ci.yml
stages:
deploy:
stage: deploy
image: php:8.3-cli
before_script:
Installing necessary tools and dependencies
- apt-get update && apt-get install -y git unzip libzip-dev libicu-dev libonig-dev rsync openssh-client
# Installing and activating PHP extensions
- docker-php-ext-install mbstring intl zip
# Installing Composer
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Installing Deployer
- composer global require deployer/deployer:^7.0
# SSH-Setup
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- ssh-keyscan $VM_IPADDRESS >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
# Deactivating the strict host key check
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
script:
Correct permissions
- find /builds/$(echo $CI_PROJECT_PATH) -type d -print0 | xargs -0 chmod 0755
- find /builds/$(echo $CI_PROJECT_PATH) -type f -print0 | xargs -0 chmod 0664
- composer install --no-dev --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs
- ~/.composer/vendor/bin/dep deploy production -vvv
resource_group: production
only:
- main
Meine settings.php
<?php
return [
'BE' => [
'debug' => true,
'installToolPassword' => '$argon2i$v=19$m=65536,t=16,p=1$akh2MC9lenVZZHpiblRhbw$43kpEesc9LEyQJZUP697bvEWo5ZMs/XIdcGBBHc7Ecw',
'passwordHashing' => [
'className' => 'TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash',
'options' => [],
],
],
'DB' => [
'Connections' => [
'Default' => [
'charset' => 'utf8mb4',
'dbname' => '',
'defaultTableOptions' => [
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
],
'driver' => 'mysql',
'host' => 'db.mariadb1011',
'password' => '',
'port' => 3306,
'user' => '',
],
],
],
'EXTCONF' => [
'lang' => [
'availableLanguages' => [
'de',
],
],
],
'EXTENSIONS' => [
'backend' => [
'backendFavicon' => 'EXT:dvmbsitepackage/Resources/Public/img/favicon.ico',
'backendLogo' => 'EXT:dvmbsitepackage/Resources/Public/img/Logo_dvmb.png',
'loginBackgroundImage' => '',
'loginFootnote' => '',
'loginHighlightColor' => '#8bb83b',
'loginLogo' => 'EXT:dvmbsitepackage/Resources/Public/img/Logo_dvmb.png',
'loginLogoAlt' => '',
],
'extensionmanager' => [
'automaticInstallation' => '1',
'offlineMode' => '0',
],
'indexed_search' => [
'catdoc' => '/usr/bin/',
'deleteFromIndexAfterEditing' => '1',
'disableFrontendIndexing' => '0',
'flagBitMask' => '192',
'fullTextDataLength' => '0',
'ignoreExtensions' => '',
'indexExternalURLs' => '0',
'maxExternalFiles' => '5',
'minAge' => '24',
'pdf_mode' => '20',
'pdftools' => '/usr/bin/',
'ppthtml' => '/usr/bin/',
'unrtf' => '/usr/bin/',
'unzip' => '/usr/bin/',
'useMysqlFulltext' => '0',
'xlhtml' => '/usr/bin/',
],
'news' => [
'advancedMediaPreview' => '1',
'archiveDate' => 'date',
'categoryBeGroupTceFormsRestriction' => '0',
'categoryRestriction' => '',
'contentElementRelation' => '1',
'dateTimeNotRequired' => '0',
'hidePageTreeForAdministrationModule' => '0',
'manualSorting' => '0',
'pageTreePluginPreview' => '1',
'prependAtCopy' => '1',
'resourceFolderImporter' => '/news_import',
'rteForTeaser' => '0',
'showAdministrationModule' => '1',
'slugBehaviour' => 'unique',
'storageUidImporter' => '1',
'tagPid' => '1',
],
'redirects' => [
'showCheckIntegrityInfoInReports' => '1',
'showCheckIntegrityInfoInReportsSeconds' => '86400',
],
'scheduler' => [
'maxLifetime' => '1440',
],
],
'FE' => [
'cacheHash' => [
'enforceValidation' => true,
],
'debug' => true,
'disableNoCacheParameter' => true,
'lifetime' => 86400,
'passwordHashing' => [
'className' => 'TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash',
'options' => [],
],
],
'GFX' => [
'processor' => 'GraphicsMagick',
'processor_effects' => false,
'processor_enabled' => true,
'processor_path' => '/usr/bin/',
],
'LOG' => [
'TYPO3' => [
'CMS' => [
'deprecations' => [
'writerConfiguration' => [
'notice' => [
'TYPO3\CMS\Core\Log\Writer\FileWriter' => [
'disabled' => false,
],
],
],
],
],
],
],
'MAIL' => [
'transport' => 'sendmail',
'transport_sendmail_command' => '/usr/local/bin/mailpit sendmail -t --smtp-addr 127.0.0.1:1025',
'transport_smtp_encrypt' => '',
'transport_smtp_password' => '',
'transport_smtp_server' => '',
'transport_smtp_username' => '',
],
'SYS' => [
'UTF8filesystem' => true,
'caching' => [
'cacheConfigurations' => [
'hash' => [
'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
],
'pages' => [
'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
'options' => [
'compression' => true,
],
],
'rootline' => [
'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
'options' => [
'compression' => true,
],
],
],
],
'devIPmask' => '*',
'displayErrors' => 1,
'encryptionKey' => 'eb59183015b0529252ce14bb22d0efc4427df8dca2d3313d849c527a8d98d73453035f8e3590d27b3e8c7aed558139ac',
'exceptionalErrors' => 12290,
'features' => [
'frontend.cache.autoTagging' => true,
],
'sitename' => 'DVMB-TH',
'systemLocale' => 'de_DE',
'systemMaintainers' => [
1,
],
],
];
Den Datenbanknamen, Passwort, und den User habe ich raus genommen. Danke schon mal für eure Hilfe