diff --git a/metactl/ci/web.sh b/metactl/ci/web.sh index 060a190..f4eb3af 100644 --- a/metactl/ci/web.sh +++ b/metactl/ci/web.sh @@ -15,6 +15,11 @@ TRIGGER="`realpath $ROOT/../../virtual/ci/web`"; while true; do + while [ -f $TRIGGER ]; do + sleep 1; + done; + + # 1. Go to root directory cd $ROOT/../..; @@ -32,9 +37,4 @@ while true; do # N. Recreate trigger test ! -f $TRIGGER && touch $TRIGGER; - - while [ -f $TRIGGER ]; do - sleep 1; - done; - done; \ No newline at end of file diff --git a/metactl/post-start.sh b/metactl/post-start.sh index 9fff605..1eeb1f3 100644 --- a/metactl/post-start.sh +++ b/metactl/post-start.sh @@ -68,4 +68,15 @@ fi; ## [3] Grant www-data for CI triggers echo -n " * Grant php on triggers....."; -docker exec php-fpm chown www-data -R /ci && echo "granted" || (echo "failed"; exit 1); \ No newline at end of file +docker exec php-fpm chown www-data -R /ci && echo "granted" || (echo "failed"; exit 1); + + +## [4] Update vhost libs/builds + +# 1. Update composer +echo -n " * Build composer............"; +docker exec php-fpm bash -c "cd /vhost; composer install" >/dev/null 2>&1 && echo "built" || (echo "failed"; exit 1); + +# 2. Re-build js/scss +echo -n " * Webpack build............."; +docker exec php-fpm bash -c "cd /vhost; npm install; npm run build" >/dev/null 2>&1 && echo "built" || (echo "failed"; exit 1); \ No newline at end of file