added recipe for sulu 2 (#1758)

This commit is contained in:
Alexander Schranz 2018-11-08 02:39:53 +01:00 committed by Anton Medvedev
parent 2eb2256377
commit f2bdcef135
2 changed files with 36 additions and 0 deletions

View File

@ -8,6 +8,7 @@
- Support to define remote shell path via host-config [#1708] [#1709] [#1709]
- Added `horizon:terminate` to the Laravel recipe
- Added `migrations_config` option to the Symfony recipes to specify Doctrine migration configuration to use
- Added recipe for sulu 2.0 [#1758]
### Changed
- Laravel recipe should not run `artisan:cache:clear` in `deploy` task
@ -420,6 +421,7 @@
- Fixed remove of shared dir on first deploy
[#1758]: https://github.com/deployphp/deployer/pull/1758
[#1709]: https://github.com/deployphp/deployer/issues/1709
[#1708]: https://github.com/deployphp/deployer/pull/1708
[#1677]: https://github.com/deployphp/deployer/pull/1677

34
recipe/sulu2.php Normal file
View File

@ -0,0 +1,34 @@
<?php
namespace Deployer;
require_once __DIR__ . '/symfony4.php';
set('shared_dirs', ['var/indexes', 'var/log', 'var/sessions', 'var/sitemaps', 'var/uploads', 'public/uploads']);
set('writable_dirs', ['var', 'public/uploads']);
set('bin/websiteconsole', function () {
return parse('{{bin/php}} {{release_path}}/bin/websiteconsole --no-interaction');
});
desc('Migrate PHPCR');
task(
'phpcr:migrate',
function () {
run('{{bin/php}} {{bin/console}} phpcr:migrations:migrate');
}
);
desc('Clear cache');
task('deploy:website:cache:clear', function () {
run('{{bin/websiteconsole}} cache:clear --no-warmup');
});
desc('Warm up cache');
task('deploy:website:cache:warmup', function () {
run('{{bin/websiteconsole}} cache:warmup');
});
after('deploy:cache:clear', 'deploy:website:cache:clear');
after('deploy:website:cache:clear', 'deploy:website:cache:warmup');