diff --git a/src/.s2i/bin/assemble b/src/.s2i/bin/assemble index 029a254..59eafd6 100755 --- a/src/.s2i/bin/assemble +++ b/src/.s2i/bin/assemble @@ -1,34 +1,40 @@ #!/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 ./ if [ -f "composer.json" ]; then echo "--->> Detected composer.json, running install" composer_install fi #./artisan horizon:install #echo "---->> Run npm run prod" #npm install #npm run ${LARAVEL_ENV:=prod} && rm -rf ~/.npm/ fix-permissions ./