Use deployer 7.x #27

Merged
thisfro merged 2 commits from develop into master 2023-02-08 17:13:36 +01:00
Showing only changes of commit a6e4b205f7 - Show all commits

View file

@ -1,7 +1,7 @@
<?php <?php
namespace Deployer; namespace Deployer;
require 'recipe/symfony4.php'; require 'recipe/symfony.php';
// Project name // Project name
set('application', 'pflaenz.li'); set('application', 'pflaenz.li');
@ -13,11 +13,11 @@ set('repository', 'ssh://git@git.thisfro.ch:222/thisfro/pflaenz.li.git');
set('git_tty', true); set('git_tty', true);
set('bin/php', function() { set('bin/php', function() {
return '/opt/php8.0/bin/php'; return '/opt/php8.2/bin/php';
}); });
set('bin/composer', function() { set('bin/composer', function() {
return '/opt/php8.0/bin/composer2'; return '/opt/php8.2/bin/composer2';
}); });
// Shared files/dirs between deploys // Shared files/dirs between deploys
@ -28,14 +28,14 @@ add('shared_dirs', ['public/uploads']);
add('writable_dirs', []); add('writable_dirs', []);
// Set composer options // Set composer options
set('composer_options', '{{composer_action}} --verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --no-scripts'); set('composer_options', '--verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --no-scripts');
// Hosts // Hosts
host('beta.pflaenz.li') host('lq5xi.ftp.infomaniak.com')
->user('lq5xi_thisfro') ->set('remote_user', 'lq5xi_thisfro')
->set('deploy_path', '~/sites/{{stage}}.{{application}}') ->set('deploy_path', '~/sites/{{stage}}.{{application}}')
->set('http_user', 'uid153060') ->set('http_user', 'uid153060')
->stage('beta'); ->set('stage', 'beta');
// Tasks // Tasks
@ -45,9 +45,9 @@ task('upload:build', function() {
// Build yarn locally // Build yarn locally
task('deploy:build:assets', function (): void { task('deploy:build:assets', function (): void {
run('yarn install'); runLocally('yarn install');
run('yarn encore production'); runLocally('yarn encore production');
})->local()->desc('Install front-end assets'); })->desc('Install front-end assets');
before('deploy:symlink', 'deploy:build:assets'); before('deploy:symlink', 'deploy:build:assets');