php-docs-samples icon indicating copy to clipboard operation
php-docs-samples copied to clipboard

Docs How To: Laravel app - cache node_modules folder using cloud_build

Open bhaidar opened this issue 5 years ago • 0 comments

Hi,

Is there a way to cache the node_modules folder from one build to another so that the build is faster?

Currently, I use the following cloud_build.yaml file:

steps:
  - name: node:14.0.0
    entrypoint: npm
    args: ['install']
  - name: node:14.0.0
    entrypoint: npm
    args: ['run', 'prod']
  - name: 'gcr.io/cloud-builders/gcloud'
    args: ['app', 'deploy', '--version', 'v1']
timeout: '3600s'

Thanks

bhaidar avatar Aug 31 '20 10:08 bhaidar