feat: implement full bff logic
This commit is contained in:
+100
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace Deployer;
|
||||
|
||||
require 'contrib/cachetool.php';
|
||||
require 'contrib/rsync.php';
|
||||
require 'recipe/symfony.php';
|
||||
|
||||
add('shared_dirs', [
|
||||
'var/log',
|
||||
'var/sessions',
|
||||
]);
|
||||
|
||||
add('shared_files', [
|
||||
'public/.htaccess',
|
||||
]);
|
||||
|
||||
set('keep_releases', 3);
|
||||
|
||||
// Rsync options, mainly files/dirs to exclude
|
||||
$rsyncOptions = [
|
||||
'exclude' => [
|
||||
'.claude',
|
||||
'.cursor',
|
||||
'.idea',
|
||||
'.vscode',
|
||||
'.DS_Store',
|
||||
'.ddev',
|
||||
'.git',
|
||||
'.github',
|
||||
'.jj',
|
||||
'node_modules',
|
||||
'.editorconfig',
|
||||
'.env.dev.local',
|
||||
'.env.dev.local.php',
|
||||
'.env.test',
|
||||
'.env.test.local',
|
||||
'.gitignore',
|
||||
'.nvmrc',
|
||||
'.php-cs-fixer.cache',
|
||||
'.php-cs-fixer.dist.php',
|
||||
'.phpunit.result.cache',
|
||||
'CLAUDE.md',
|
||||
'cypress*',
|
||||
'deploy.php',
|
||||
'docs',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'*.http',
|
||||
'http-client*.json',
|
||||
'postcss.config.js',
|
||||
'phpunit.xml.dist',
|
||||
'public/.htaccess',
|
||||
'tailwind.config.js',
|
||||
'webpack.config.js',
|
||||
'bin/.phpunit',
|
||||
'temp/',
|
||||
'tests/',
|
||||
'uploads/',
|
||||
'var/',
|
||||
],
|
||||
'exclude-file' => false,
|
||||
'include' => [],
|
||||
'include-file' => false,
|
||||
'filter' => [],
|
||||
'filter-file' => false,
|
||||
'filter-perdir' => false,
|
||||
'flags' => 'rz',
|
||||
'options' => ['delete', 'copy-links', 'chmod=D755,F664'],
|
||||
'timeout' => 300,
|
||||
];
|
||||
|
||||
host('prod')
|
||||
->setHostname('185.243.135.29')
|
||||
->setRemoteUser('p704161')
|
||||
->setForwardAgent(true)
|
||||
->setSshMultiplexing(true)
|
||||
->setDeployPath('/home/www/p704161/html/epbff')
|
||||
->set('writable_mode', 'chmod')
|
||||
->set('http_user', 'p704161')
|
||||
->set('bin/php', '/usr/local/bin/php')
|
||||
->set('rsync_src', __DIR__)
|
||||
->set('rsync', $rsyncOptions)
|
||||
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/public/ --web-url=https://bff.ep-reisen.net')
|
||||
;
|
||||
|
||||
task('deploy', [
|
||||
'deploy:info',
|
||||
'deploy:setup',
|
||||
'deploy:lock',
|
||||
'deploy:release',
|
||||
'rsync',
|
||||
'deploy:shared',
|
||||
'deploy:writable',
|
||||
'deploy:cache:clear',
|
||||
'cachetool:clear:opcache',
|
||||
'deploy:publish',
|
||||
]);
|
||||
|
||||
after('deploy:failed', 'deploy:unlock');
|
||||
Reference in New Issue
Block a user