https://faq.tuxfamily.org/api.php?action=feedcontributions&user=Arcenterre&feedformat=atomTuxFamilyFAQ - User contributions [en]2024-03-29T08:02:04ZUser contributionsMediaWiki 1.33.0https://faq.tuxfamily.org/index.php?title=WebArea/Compat/Composer/En&diff=3928WebArea/Compat/Composer/En2021-06-30T00:13:26Z<p>Arcenterre: </p>
<hr />
<div>Composer is a commonly used tool to build PHP applications and handle the task of fetching dependencies. To do so, it tends to store/cache information in its "composer home" which by default is ~/.composer.<br />
<br />
However, TuxFamily enforces very restrictive quotas on user homes, making composer unusable out of the box. Therefore, it becomes necessary to move the composer home under a group directory, using the COMPOSER_HOME environment variable:<br />
export COMPOSER_HOME=/home/myprojectgroup/tools/composer<br />
mkdir -p "${COMPOSER_HOME}"<br />
composer ...<br />
<br />
Another suitable location is the "php-include" directory under a webarea directory (do not mind the name).<br />
<br />
In case of dependencies installation failure, try installing the packages in /tmp and move them to the desired folder afterwards.<br />
mkdir /tmp/dest<br />
chgrp myprojectgroup /tmp/dest<br />
chmod +s /tmp/dest<br />
COMPOSER_VENDOR_DIR=/tmp/dest ~/myprojectgroup/tools/composer/composer.phar install</div>Arcenterre