From b3e39f7cc995082501a3fbf2aa247aa76b222a01 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 8 May 2018 15:36:11 +1000 Subject: [PATCH] Added composer (re)installation --- start | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/start b/start index 7596dec..21f1c15 100755 --- a/start +++ b/start @@ -5,7 +5,7 @@ role=${CONTAINER_ROLE:-app} env=${APP_ENV:-production} # General Setup -if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then +if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then [ ! -d /var/run/sshd ] && mkdir /var/run/sshd start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22 fi @@ -13,6 +13,11 @@ fi # Laravel Specific if [ "${role}" = "app" ]; then if [ "${env}" != "local" -a -r "artisan" ]; then + # See if we need to refresh our dependancies + if [[ -r composer.lock && ( -e .composer.refresh || ! -d vendor ) ]]; then + composer install + fi + echo "Caching configuration..." (php artisan config:cache && php artisan route:cache && php artisan view:cache) fi