feat(composer): improve performance

hirak/prestissimo install composer package in parallel
pull/34/head
Magicalex 2018-12-02 15:25:13 +01:00
parent 032c55b304
commit 59d39362de
No known key found for this signature in database
GPG Key ID: A89B48B1788C3CB5
2 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.8/community" >> /etc/a
&& cd /tmp \
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& chmod +x /usr/local/bin/composer \
&& composer global require hirak/prestissimo \
&& mkdir -p /flarum/app \
&& chown -R $UID:$GID /flarum \
&& COMPOSER_CACHE_DIR="/tmp" su-exec $UID:$GID composer create-project flarum/flarum /flarum/app $VERSION --stability=beta \

View File

@ -78,10 +78,10 @@ if [ -e '/flarum/app/public/assets/installed.txt' ]; then
# Download extra extensions installed with composer wrapup script
if [ -s "$LIST_FILE" ]; then
echo "[INFO] Install extra bundled extensions"
while read extension; do
echo "[INFO] -------------- Install extension : ${extension} --------------"
COMPOSER_CACHE_DIR="$CACHE_DIR" su-exec $UID:$GID composer require "$extension"
while read line; do
extension="$extension $line"
done < "$LIST_FILE"
COMPOSER_CACHE_DIR="$CACHE_DIR" su-exec $UID:$GID composer require "$extension"
echo "[INFO] Install extra bundled extensions. DONE."
else
echo "[INFO] No installed extensions"