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

EZP-31377: Use imagick by default on Platform.sh to avoid memory issues #501

Merged
merged 7 commits into from
Feb 24, 2020
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
4 changes: 4 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ jms_translation:
output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui-modules/Resources/translations/'
excluded_dirs: [Behat, Tests, node_modules]
output_format: "xliff"

liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "%liip_imagine_driver%"
3 changes: 3 additions & 0 deletions app/config/default_parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,6 @@ parameters:
# Varnish invalidation/purge token (for use on platform.sh, eZ Platform Cloud and other places you can't use IP for ACL)
varnish_invalidate_token: '%env(HTTPCACHE_VARNISH_INVALIDATE_TOKEN)%'
env(HTTPCACHE_VARNISH_INVALIDATE_TOKEN): ~

# LiipImagineBundle - imagine driver
liip_imagine_driver: 'gd'
6 changes: 6 additions & 0 deletions app/config/env/platformsh.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@
if (!getenv('HTTPCACHE_VARNISH_INVALIDATE_TOKEN')) {
$container->setParameter('varnish_invalidate_token', getenv('PLATFORM_PROJECT_ENTROPY'));
}

// Adapt config based on enabled PHP extensions
// Get imagine to use imagick if enabled, to avoid using php memory for image convertions
if (extension_loaded('imagick')) {
$container->setParameter('liip_imagine_driver', 'imagick');
}