1 - Fix npm install skipped on first boot due to volume-mounted node_modules
This commit is contained in:
parent
9929a837fe
commit
22680d45a7
2 changed files with 1612 additions and 2 deletions
|
|
@ -80,8 +80,10 @@ if [ ! -f "vendor/autoload.php" ]; then
|
||||||
composer install --no-interaction
|
composer install --no-interaction
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install npm dependencies if node_modules is empty
|
# Install npm dependencies if node_modules lacks an install marker.
|
||||||
if [ ! -d "node_modules" ] && [ -f "package.json" ]; then
|
# Can't use `[ ! -d node_modules ]` — the dir is always present because it's a
|
||||||
|
# named volume mount. Check for npm's post-install marker file instead.
|
||||||
|
if [ -f "package.json" ] && [ ! -f "node_modules/.package-lock.json" ]; then
|
||||||
echo "Installing npm dependencies..."
|
echo "Installing npm dependencies..."
|
||||||
npm install
|
npm install
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
1608
package-lock.json
generated
Normal file
1608
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue