Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recipe for sulu 1.x and improve sulu 2.x recipe #1764

Merged
merged 2 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 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]
- Added recipe for sulu 1.x and improve sulu 2.0 recipe [#1764]

### Changed
- Laravel recipe should not run `artisan:cache:clear` in `deploy` task
Expand Down Expand Up @@ -422,6 +423,7 @@
- Fixed remove of shared dir on first deploy


[#1764]: https://github.com/deployphp/deployer/pull/1764
[#1758]: https://github.com/deployphp/deployer/pull/1758
[#1709]: https://github.com/deployphp/deployer/issues/1709
[#1708]: https://github.com/deployphp/deployer/pull/1708
Expand Down
34 changes: 34 additions & 0 deletions recipe/sulu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Deployer;

require_once __DIR__ . '/symfony3.php';

add('shared_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'web/uploads']);

add('writable_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'web/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 {{console_options}}');
}
);

desc('Clear cache');
task('deploy:website:cache:clear', function () {
run('{{bin/websiteconsole}} cache:clear {{console_options}} --no-warmup');
});

desc('Warm up cache');
task('deploy:website:cache:warmup', function () {
run('{{bin/websiteconsole}} cache:warmup {{console_options}}');
});

after('deploy:cache:clear', 'deploy:website:cache:clear');
after('deploy:website:cache:clear', 'deploy:website:cache:warmup');
4 changes: 2 additions & 2 deletions recipe/sulu2.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

require_once __DIR__ . '/symfony4.php';

set('shared_dirs', ['var/indexes', 'var/log', 'var/sessions', 'var/sitemaps', 'var/uploads', 'public/uploads']);
add('shared_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'public/uploads']);

set('writable_dirs', ['var', 'public/uploads']);
add('writable_dirs', ['public/uploads']);

set('bin/websiteconsole', function () {
return parse('{{bin/php}} {{release_path}}/bin/websiteconsole --no-interaction');
Expand Down
2 changes: 1 addition & 1 deletion recipe/symfony4.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Deployer;

require_once 'recipe/common.php';
require_once __DIR__ . '/common.php';

set('shared_dirs', ['var/log', 'var/sessions']);
set('shared_files', ['.env']);
Expand Down