Skip to content

Commit

Permalink
Make composer run without PHP client memory limits
Browse files Browse the repository at this point in the history
This tries to address the problem that happens on very small machines (4 Gbytes on the host) where Docker runs out of memory first before composer has even the change to inform that (returning a "killed" message). If enough memory is around, with this change at least we will give Composer the chance to use all of it.
  • Loading branch information
DiegoPino authored Nov 12, 2019
1 parent 21e00f4 commit 6ae6008
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/archipelago/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

# Part of the Archipelago Commons Project
# This should be run as: docker exec -ti esmero-php bash -c 'scripts/archipelago/update.sh'
# If you Host Machine (the one where your keyboard and screen is attached!) has 4Gbytes, memory can run out during
# composer update (you will see a "killed" message. We recommend:
# Do a docker ps first and stop every container except esmero-php and esmero-web.
# Re run this script.

echo -ne "Updating Archipelago Packages to whatever is latest in this release!\n"
echo -ne "Running as " && whoami;
composer update strawberryfield/strawberryfield strawberryfield/format_strawberryfield strawberryfield/webform_strawberryfield archipelago/archipelago_subtheme --no-scripts;
php -d memory_limit=-1 /usr/bin/composer update strawberryfield/strawberryfield strawberryfield/format_strawberryfield strawberryfield/webform_strawberryfield archipelago/archipelago_subtheme --no-scripts;
(($? != 0)) && { printf '%s\n' "Updating strawberryfield packages via composer failed"; exit 1; }
drush status bootstrap | grep -q Successful;
(($? == 0)) && { drush cr; }
Expand Down

0 comments on commit 6ae6008

Please sign in to comment.