+fix 'web' spy does nothing before 'docker-compose up' -> now in 'post-start' script
This commit is contained in:
parent
b85c357d9a
commit
13e9af7d6e
|
@ -15,6 +15,11 @@ TRIGGER="`realpath $ROOT/../../virtual/ci/web`";
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
|
while [ -f $TRIGGER ]; do
|
||||||
|
sleep 1;
|
||||||
|
done;
|
||||||
|
|
||||||
|
|
||||||
# 1. Go to root directory
|
# 1. Go to root directory
|
||||||
cd $ROOT/../..;
|
cd $ROOT/../..;
|
||||||
|
|
||||||
|
@ -32,9 +37,4 @@ while true; do
|
||||||
# N. Recreate trigger
|
# N. Recreate trigger
|
||||||
test ! -f $TRIGGER && touch $TRIGGER;
|
test ! -f $TRIGGER && touch $TRIGGER;
|
||||||
|
|
||||||
|
|
||||||
while [ -f $TRIGGER ]; do
|
|
||||||
sleep 1;
|
|
||||||
done;
|
|
||||||
|
|
||||||
done;
|
done;
|
|
@ -69,3 +69,14 @@ fi;
|
||||||
## [3] Grant www-data for CI triggers
|
## [3] Grant www-data for CI triggers
|
||||||
echo -n " * Grant php on triggers.....";
|
echo -n " * Grant php on triggers.....";
|
||||||
docker exec php-fpm chown www-data -R /ci && echo "granted" || (echo "failed"; exit 1);
|
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);
|
Loading…
Reference in New Issue