Commit df0f98ff authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

packacking cache to increase speed

parent 14f34e77
......@@ -78,11 +78,7 @@ spec:
- name: node-modules
mountPath: /html/node_modules
- name: packages
subPath: .npm
mountPath: /cache/.npm
- name: packages
subPath: .composer
mountPath: /cache/.composer
mountPath: /cache
# Run init container as root to allow setting proper file permissions
securityContext:
runAsUser: 0
......
......@@ -2,10 +2,25 @@
set -e
# Extract cache
if [ -f /cache/npm.tar ];
then
tar -xf /cache/npm.tar
fi
if [ -f /cache/composer.tar ];
then
tar -xf /cache/composer.tar
fi
# Install node modules
npm i --cache /cache/.npm --prefer-offline --no-audit --progress=false
npm run prod
# Install composer modules
export COMPOSER_HOME=/cache/.composer
composer install --no-dev
\ No newline at end of file
composer install --no-dev
# Package Cache
tar -cf /cache/npm.tar .npm
tar -cf /cache/composer.tar .composer
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment