From c33ed73651487b763e29170faf68b7222234f520 Mon Sep 17 00:00:00 2001 From: Kieren Evans Date: Tue, 27 Jun 2017 18:51:41 +0100 Subject: [PATCH] Generate the requirejs secure files, which aren't generated using the normal setup:static-content:deploy command. --- .../usr/local/share/magento2/magento_functions.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/magento2-nginx/fpm-7.0/usr/local/share/magento2/magento_functions.sh b/magento2-nginx/fpm-7.0/usr/local/share/magento2/magento_functions.sh index e1a7bca3..0d60f2ae 100644 --- a/magento2-nginx/fpm-7.0/usr/local/share/magento2/magento_functions.sh +++ b/magento2-nginx/fpm-7.0/usr/local/share/magento2/magento_functions.sh @@ -95,10 +95,18 @@ function do_magento_dependency_injection_compilation() { function do_magento_deploy_static_content() { # Compile static content if it's a production container. if [ "$MAGENTO_MODE" = "production" ]; then - as_code_owner "bin/magento setup:static-content:deploy $FRONTEND_COMPILE_LANGUAGES" + set +e + run_magento_deploy_static_content "" "--no-javascript $FRONTEND_COMPILE_LANGUAGES" + run_magento_deploy_static_content "on" "--no-css --no-less --no-images --no-fonts --no-html --no-misc --no-html-minify $FRONTEND_COMPILE_LANGUAGES" + set -e fi } +function run_magento_deploy_static_content() { + local FLAGS="$2" + HTTPS="$1" as_code_owner "bin/magento setup:static-content:deploy $FLAGS" +} + function do_magento_reindex() { (as_code_owner "bin/magento indexer:reindex" || echo "Failing indexing to the end, ignoring.") && echo "Indexing successful" }