diff --git a/src/.s2i/bin/assemble b/src/.s2i/bin/assemble index dbfdc5c..68eab4a 100755 --- a/src/.s2i/bin/assemble +++ b/src/.s2i/bin/assemble @@ -1,40 +1,37 @@ #!/bin/bash set -x set -e -function composer_install () { - echo "--->> Detected composer.json, running install" - php -dmemory_limit=${COMPOSER_MEMORY_LIMIT:--1} /usr/bin/composer install ${COMPOSER_ARGS} - rm -rf ~/.cache/composer/ -} - function fix-permissions () { chgrp -R 0 $1 chmod -R og+rw $1 find $1 -type d -exec chmod g+x {} + } shopt -s dotglob echo "--->> $(rm -vrf vendor/ composer.lock)" echo "---> Installing application source..." rm -fR /tmp/src/.git mv /tmp/src/* ./ pushd /opt/app-root/src -#fix-permissions ./ +ls + +fix-permissions /opt/app-root/src if [ -f "composer.json" ]; then echo "--->> Detected composer.json, running install" - composer_install + php -dmemory_limit=${COMPOSER_MEMORY_LIMIT:--1} /usr/bin/composer install ${COMPOSER_ARGS} + rm -rf ~/.cache/composer/ fi #./artisan horizon:install #echo "---->> Run npm run prod" #npm install #npm run ${LARAVEL_ENV:=prod} && rm -rf ~/.npm/ -#fix-permissions ./ +fix-permissions /opt/app-root/src