Ich habe mir das Deployment-Webinar von Wolfgang gekauft und nachgearbeitet. Nur werden bei mir die Abhängigkeiten nicht geladen.
Hier der Abschitt Abhängigkeiten Installieren:
composer install --no-dev --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs
shell: /usr/bin/bash -e {0}
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
SSH_AUTH_SOCK: /tmp/ssh-vUBrNwUAaFNY/agent.2311
SSH_AGENT_PID: 2312
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 3 installs, 0 updates, 0 removals
- Downloading helhum/php-error-reporting (v1.0.1)
- Downloading helhum/config-loader (v0.12.6)
- Downloading helhum/typo3-console (v8.3.1)
- Installing helhum/php-error-reporting (v1.0.1): Extracting archive
- Installing helhum/config-loader (v0.12.6): Extracting archive
- Installing helhum/typo3-console (v8.3.1): Extracting archive
Package doctrine/annotations is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
Generating class alias map file
Publishing public assets of TYPO3 extensions
Published public assets
48 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
die helhum console habe ich Nachträglich installiert und die wird geladen!
Die PHP Version wird wohl richtig gesetzt im Abschnitt Install PHP and Composer:
Run shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, intl
ini-file: production
github-token: ***
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh
==> Setup PHP
✓ PHP Updated to PHP 8.3.28
==> Setup Extensions
✓ mbstring Enabled
✓ intl Enabled
==> Setup Tools
✓ composer Added composer 2.9.3
==> Sponsor setup-php
✓ setup-php https://setup-php.com/sponsor
Die SSH Schlüssel werden auch eingelesen SSH-Agent starten und Schlüssel hinzufügen:
Run webfactory/ssh-agent@v0.9.0
Starting ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-vUBrNwUAaFNY/agent.2311
SSH_AGENT_PID=2312
Adding private key(s) to agent
Identity added: (stdin) (githubtoserver)
Key(s) added:
256 SHA2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx githubtoserver (ED25519)
Configuring deployment key(s)
Comment for (public) key 'ssh-ed25519xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgithubtoserver' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.
Im eigentlichen Deployment auf den Server (Cloudhosting bei Jweiland) gibt er mir diesen Fehler zurück:
task typo3:extension_setup
[production] ssh '-p' '22' '-A' '-o' 'ControlMaster=auto' '-o' 'ControlPersist=60' '-o' 'ControlPath=/dev/shm/webmaste5@***:22' 'webmaste5@***' ': 2bcb113941cc52a37ea3; bash -ls'
[production] run /var/www/vhosts/xxxxxx.jweiland-hosting.de/httpdocs/typo3cms/xxxxxx.de/production/releases/4/vendor/bin/typo3 extension:setup
[production] nodenv: no such command `init'
[production] Uncaught TYPO3 Exception Class "TYPO3\CMS\Core\DependencyInjection\ResolveClassPass" not found
[production] thrown in file /var/www/vhosts/xxxxx.jweiland-hosting.de/httpdocs/typo3cms/xxxxxxx.de/production/releases/4/vendor/typo3/cms-core/Classes/DependencyInjection/ContainerBuilder.php
[production] in line 104
[production] error in functions.php on line 421:
[production] exit code 1 (General error)
ERROR: Task before:deploy:symlink failed!
task deploy:failed
task deploy:unlock
Error: Process completed with exit code 1.
Meine deploy.yml sieht so aus!
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: production
cancel-in-progress: false
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, intl
- name: Install Deployer
run: |
composer global require deployer/deployer
export PATH="$HOME/.composer/vendor/bin:$PATH"
- name: SSH-Agent starten und Schlüssel hinzufügen
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: SSH konfigurieren
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Abhängigkeiten installieren
run: |
composer install --no-dev --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs
- name: Deployment auf Produktion
run: |
dep deploy production -vvv
Die dazugehörige deploy.php sieht 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', 'webmaste5');
set('http_group', 'psacln');
set('/.local/bin/php', 'php');
set('bin/typo3', '{{release_path}}/vendor/bin/typo3');
// Set maximum number of releases
set('keep_releases', 5);
// Since updating the ReferenceIndex takes a very long time for some projects, this value must be increased.
set('default_timeout', 1200); // 20 minutes instead of the standard 5 minutes
// 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 = [
'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',
'.gitlab-ci.yml',
'phpstan.neon',
'phpunit.xml',
'README*',
'rector.php',
'typoscript-lint.yml',
'/.deployment',
'/var',
'/**/Tests/*',
'dbv13.sql',
'fileadmin.tar.gz',
'README.md',
'fetchdatabase.sh',
'renovate.json',
// Node.js / Playwright files
'node_modules',
'package.json',
'package-lock.json',
'playwright.config.ts',
'/tests/',
'/test-results/',
'/playwright-report/',
'/blob-report/',
'/playwright/.cache/',
'npm-debug.log*',
// GitHub Actions
'.github',
// CLAUDE.md (development documentation)
'CLAUDE.md',
'config.sh',
'sync.sh',
'dvmb-bb_final.sql',
'dump.sql'
];
// 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 page caches');
task('typo3:cache_flush', function () {
run('{{bin/typo3}} cache:flush -g pages');
});
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 database 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');
});
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
before('deploy:symlink', function () {
// 2. Strukturelle Änderungen
invoke('typo3:fix_folder_structure');
invoke('correct_permissions');
// 3. Extensions und Datenbank
invoke('typo3:extension_setup');
invoke('typo3:update_database');
// 5. Datenoperationen
invoke('typo3:update_reference_index');
invoke('typo3:language_update');
// 6. Cache-Operationen vor dem Symlink
invoke('typo3:cache_warmup');
});
after('deploy:symlink', function () {
// Cache-Operationen nach dem Symlink
invoke('typo3:cache_flush');
});
// Main deployment task
desc('Deploy TYPO3 project');
task('deploy', [
'deploy:prepare',
'deploy:publish',
]);
// Unlock on failed deployment
after('deploy:failed', 'deploy:unlock');
Deployt wird mit Github und github-actions! Vieleicht weiß jemand wie und vorallem wo ich einen Debug Befehl einbauen kann um den Fehler auf die Spur zu kommen. Und wie müsste dieser Debugbefehl aussehen. Mir gehen mittlerweile die Iden aus wie ich dieses Problem lösen kann. Solltet Ihr noch weitere Infos brauchen, schreibt es mir.Ich danke schon mal für die Hilfe, die ich hoffentlich bekomme.