Pimcore recipe fixes (#3212)

* Share Pimcore database configuration

* writeable var/cache/dev
This commit is contained in:
Michał Giza 2022-07-23 15:45:59 +02:00 committed by GitHub
parent b6fd811edb
commit b92b1c6dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 5 deletions

View File

@ -13,7 +13,7 @@
## Tasks
### pimcore:rebuild-classes
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L13)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L15)
Rebuilds Pimcore Classes.
@ -21,15 +21,23 @@ Rebuilds Pimcore Classes.
### pimcore:custom-layouts-rebuild
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L18)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L20)
Creates Custom Layouts.
### pimcore:cache_clear
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L25)
Removes cache.
### pimcore:deploy
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L22)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L29)
@ -38,5 +46,6 @@ Creates Custom Layouts.
This task is group task which contains next tasks:
* [pimcore:rebuild-classes](/docs/recipe/pimcore.md#pimcorerebuild-classes)
* [pimcore:custom-layouts-rebuild](/docs/recipe/pimcore.md#pimcorecustom-layouts-rebuild)

View File

@ -7,7 +7,9 @@ add('recipes', ['pimcore']);
add('shared_dirs', ['public/var', 'var/email', 'var/recyclebin', 'var/versions']);
add('writable_dirs', ['public/var']);
add('shared_files', ['config/local/database.yaml']);
add('writable_dirs', ['public/var', 'var/cache/dev']);
desc('Rebuilds Pimcore Classes');
task('pimcore:rebuild-classes', function () {
@ -19,9 +21,15 @@ task('pimcore:custom-layouts-rebuild', function () {
run('{{bin/console}} pimcore:deployment:custom-layouts-rebuild --create-custom-layouts --delete-custom-layouts --no-interaction');
});
desc('Removes cache');
task('pimcore:cache_clear', function () {
run('rm -rf {{release_or_current_path}}/var/cache/dev/*');
});
task('pimcore:deploy', [
'pimcore:rebuild-classes',
'pimcore:custom-layouts-rebuild'
'pimcore:custom-layouts-rebuild',
'pimcore:cache_clear'
]);
after('deploy:vendors', 'pimcore:deploy');