I have using Digitalocean apps to deploy strapi project and noticed that it extremely slow, takes over 20 - 30 minutes even though i just remove a line in source code.It pending at Adding label process long time.How can improve?

This is my log:

[reviewapp-strapi] [2021-09-07 07:33:16] => Initializing build
[reviewapp-strapi] [2021-09-07 07:33:16] => Retrieving source code to /workspace
[reviewapp-strapi] [2021-09-07 07:33:16] => Selecting branch "master"
[reviewapp-strapi] [2021-09-07 07:33:17] => Checking out commit "7968767213f3efec76ef9a6189d86b0245dee35e"
[reviewapp-strapi] [2021-09-07 07:33:18] => Got source_dir: /
[reviewapp-strapi] [2021-09-07 07:33:18] => Using workspace root /workspace
[reviewapp-strapi] [2021-09-07 07:33:18] 
[reviewapp-strapi] [2021-09-07 07:33:18] => Building app using buildpacks
[reviewapp-strapi] [2021-09-07 07:33:18] => Injecting app environment variables:
[reviewapp-strapi] [2021-09-07 07:33:18]      DO_SPACE_BUCKET EMAIL_SMTP_USER EMAIL_SMTP_PASS FONTEND_URL EMAIL_ADDRESS_REPLY DO_SPACE_SECRET_KEY EMAIL_ADDRESS_FROM EMAIL_SMTP_HOST DO_SPACE_ENDPOINT LIMIT_DATA EMAIL_SMTP_PORT DATABASE_URL DO_SPACE_ACCESS_KEY EMAIL_PROVIDER
[reviewapp-strapi] [2021-09-07 07:33:18] => Configuring custom build command to be run at the end of the build:
[reviewapp-strapi] [2021-09-07 07:33:18]      NODE_ENV=production npm run build
[reviewapp-strapi] [2021-09-07 07:33:19] => Running buildpack detection
[reviewapp-strapi] [2021-09-07 07:33:19] 
[reviewapp-strapi] [2021-09-07 07:33:19] heroku/nodejs-engine  0.5.0
[reviewapp-strapi] [2021-09-07 07:33:19] digitalocean/node     0.3.4
[reviewapp-strapi] [2021-09-07 07:33:19] digitalocean/procfile 0.0.3
[reviewapp-strapi] [2021-09-07 07:33:19] digitalocean/custom   0.1.0
[reviewapp-strapi] [2021-09-07 07:33:19] 
[reviewapp-strapi] [2021-09-07 07:33:19] For documentation on the buildpacks used to build your app, please see:
[reviewapp-strapi] [2021-09-07 07:33:19]    Node.js: https://do.co/apps-buildpack-node
[reviewapp-strapi] [2021-09-07 07:33:19] 
[reviewapp-strapi] [2021-09-07 07:33:19] => Checking for cache from a previous build
[reviewapp-strapi] [2021-09-07 07:33:29] Restoring metadata for "heroku/nodejs-engine:nodejs" from app image
[reviewapp-strapi] [2021-09-07 07:33:29] Restoring metadata for "heroku/nodejs-engine:toolbox" from cache
[reviewapp-strapi] [2021-09-07 07:33:29] Restoring metadata for "digitalocean/node:node_modules" from cache
[reviewapp-strapi] [2021-09-07 07:33:35] Restoring data for "heroku/nodejs-engine:nodejs" from cache
[reviewapp-strapi] [2021-09-07 07:33:35] Restoring data for "heroku/nodejs-engine:toolbox" from cache
[reviewapp-strapi] [2021-09-07 07:33:35] Restoring data for "digitalocean/node:node_modules" from cache
[reviewapp-strapi] [2021-09-07 07:34:08] 
[reviewapp-strapi] [2021-09-07 07:34:08] => Building app
[reviewapp-strapi] [2021-09-07 07:34:08] 
[reviewapp-strapi] [2021-09-07 07:34:08] ---> Node.js Buildpack
[reviewapp-strapi] [2021-09-07 07:34:08] ---> Installing toolbox
[reviewapp-strapi] [2021-09-07 07:34:08] ---> Getting Node version
[reviewapp-strapi] [2021-09-07 07:34:08] ---> Resolving Node version
[reviewapp-strapi] [2021-09-07 07:34:14] ---> Reusing Node v14.17.6
[reviewapp-strapi] [2021-09-07 07:34:14] ---> Parsing package.json
[reviewapp-strapi] [2021-09-07 07:34:15] ---> No file to start server
[reviewapp-strapi] [2021-09-07 07:34:15] ---> either use 'docker run' to start container or add index.js or server.js
[reviewapp-strapi] [2021-09-07 07:34:15] Project contains package-lock.json, using npm
[reviewapp-strapi] [2021-09-07 07:34:15] Using npm v6.14.15 matching the requested version range "^6.0.0" in package.json->engines.npm
[reviewapp-strapi] [2021-09-07 07:34:15] Installing node_modules using npm (from package-lock.json)
[reviewapp-strapi] [2021-09-07 07:34:16] Running npm ci
[reviewapp-strapi] [2021-09-07 07:34:16] 
[reviewapp-strapi] [2021-09-07 07:35:09] 
[reviewapp-strapi] [2021-09-07 07:35:09] > aws-sdk@2.939.0 postinstall /workspace/node_modules/strapi-provider-upload-aws-s3-sharp-resize/node_modules/aws-sdk
[reviewapp-strapi] [2021-09-07 07:35:09] > node scripts/check-node-version.js
[reviewapp-strapi] [2021-09-07 07:35:09] 
[reviewapp-strapi] [2021-09-07 07:35:09] 
[reviewapp-strapi] [2021-09-07 07:35:09] > aws-sdk@2.939.0 postinstall /workspace/node_modules/strapi-provider-upload-aws-s3-resizing-and-optimisation/node_modules/aws-sdk
[reviewapp-strapi] [2021-09-07 07:35:09] > node scripts/check-node-version.js
[reviewapp-strapi] [2021-09-07 07:35:09] 
[reviewapp-strapi] [2021-09-07 07:35:10] 
[reviewapp-strapi] [2021-09-07 07:35:10] > sharp@0.26.3 install /workspace/node_modules/strapi-provider-upload-aws-s3-resizing-and-optimisation/node_modules/sharp
[reviewapp-strapi] [2021-09-07 07:35:10] > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
[reviewapp-strapi] [2021-09-07 07:35:10] 
[reviewapp-strapi] [2021-09-07 07:35:10] info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-linux-x64.tar.br
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] > @fortawesome/fontawesome-common-types@0.2.36 postinstall /workspace/node_modules/@fortawesome/fontawesome-common-types
[reviewapp-strapi] [2021-09-07 07:35:15] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] Font Awesome Free 0.2.36 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:15] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] > @fortawesome/free-solid-svg-icons@5.15.3 postinstall /workspace/node_modules/@fortawesome/free-solid-svg-icons
[reviewapp-strapi] [2021-09-07 07:35:15] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:15] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] > @fortawesome/free-regular-svg-icons@5.15.4 postinstall /workspace/node_modules/@fortawesome/free-regular-svg-icons
[reviewapp-strapi] [2021-09-07 07:35:15] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:15] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] > @fortawesome/fontawesome-svg-core@1.2.35 postinstall /workspace/node_modules/@fortawesome/fontawesome-svg-core
[reviewapp-strapi] [2021-09-07 07:35:15] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] Font Awesome Free 1.2.35 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:15] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:15] > @fortawesome/fontawesome-free@5.15.3 postinstall /workspace/node_modules/@fortawesome/fontawesome-free
[reviewapp-strapi] [2021-09-07 07:35:15] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:15] 
[reviewapp-strapi] [2021-09-07 07:35:16] Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:16] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:16] > @fortawesome/free-brands-svg-icons@5.15.3 postinstall /workspace/node_modules/@fortawesome/free-brands-svg-icons
[reviewapp-strapi] [2021-09-07 07:35:16] > node attribution.js
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:16] Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
[reviewapp-strapi] [2021-09-07 07:35:16] License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:16] > sharp@0.28.1 install /workspace/node_modules/sharp
[reviewapp-strapi] [2021-09-07 07:35:16] > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
[reviewapp-strapi] [2021-09-07 07:35:16] 
[reviewapp-strapi] [2021-09-07 07:35:17] sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] > core-js@3.14.0 postinstall /workspace/node_modules/fbjs/node_modules/core-js
[reviewapp-strapi] [2021-09-07 07:35:20] > node -e "try{require('./postinstall')}catch(e){}"
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
[reviewapp-strapi] [2021-09-07 07:35:20] > https://opencollective.com/core-js 
[reviewapp-strapi] [2021-09-07 07:35:20] > https://www.patreon.com/zloirock 
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:20] > fsevents@1.2.13 install /workspace/node_modules/webpack-dev-server/node_modules/fsevents
[reviewapp-strapi] [2021-09-07 07:35:20] > node install.js
[reviewapp-strapi] [2021-09-07 07:35:20] 
[reviewapp-strapi] [2021-09-07 07:35:21] 
[reviewapp-strapi] [2021-09-07 07:35:21] Skipping 'fsevents' build as platform linux is not supported
[reviewapp-strapi] [2021-09-07 07:35:21] 
[reviewapp-strapi] [2021-09-07 07:35:21] > fsevents@1.2.13 install /workspace/node_modules/watchpack-chokidar2/node_modules/fsevents
[reviewapp-strapi] [2021-09-07 07:35:21] > node install.js
[reviewapp-strapi] [2021-09-07 07:35:21] 
[reviewapp-strapi] [2021-09-07 07:35:21] 
[reviewapp-strapi] [2021-09-07 07:35:21] Skipping 'fsevents' build as platform linux is not supported
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:22] > core-js@2.6.12 postinstall /workspace/node_modules/core-js
[reviewapp-strapi] [2021-09-07 07:35:22] > node -e "try{require('./postinstall')}catch(e){}"
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:22] > strapi@3.6.8 postinstall /workspace/node_modules/strapi
[reviewapp-strapi] [2021-09-07 07:35:22] > node lib/utils/success.js
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:22] > sqlite3@5.0.0 install /workspace/node_modules/sqlite3
[reviewapp-strapi] [2021-09-07 07:35:22] > node-pre-gyp install --fallback-to-build
[reviewapp-strapi] [2021-09-07 07:35:22] 
[reviewapp-strapi] [2021-09-07 07:35:23] node-pre-gyp WARN Using request for node-pre-gyp https download 
[reviewapp-strapi] [2021-09-07 07:35:31] [sqlite3] Success: "/workspace/node_modules/sqlite3/lib/binding/napi-v3-linux-x64/node_sqlite3.node" is installed via remote
[reviewapp-strapi] [2021-09-07 07:35:31] added 1734 packages in 74.57s
[reviewapp-strapi] [2021-09-07 07:35:31] 
[reviewapp-strapi] [2021-09-07 07:36:00] Running custom build command: NODE_ENV=production npm run build
[reviewapp-strapi] [2021-09-07 07:36:00] 
[reviewapp-strapi] [2021-09-07 07:36:00] > my-project@0.1.0 build /workspace
[reviewapp-strapi] [2021-09-07 07:36:00] > strapi build
[reviewapp-strapi] [2021-09-07 07:36:00] 
[reviewapp-strapi] [2021-09-07 07:36:02] config ${reviewapp.DATABASE_URL}
[reviewapp-strapi] [2021-09-07 07:36:02] Building your admin UI with production configuration ...
[reviewapp-strapi] [2021-09-07 07:36:05] ℹ Compiling Webpack
[reviewapp-strapi] [2021-09-07 07:37:09] ✔ Webpack: Compiled successfully in 1.08m
[reviewapp-strapi] [2021-09-07 07:37:20] 
[reviewapp-strapi] [2021-09-07 07:37:20] => Uploading the built Docker image to the container registry...
[reviewapp-strapi] [2021-09-07 07:37:23] Reusing layers from image <registry-uri-0>
[reviewapp-strapi] [2021-09-07 07:37:30] Reusing layer 'heroku/nodejs-engine:nodejs'
[reviewapp-strapi] [2021-09-07 07:38:31] Adding 2/2 app layer(s)
[reviewapp-strapi] [2021-09-07 07:38:31] Reusing layer 'launcher'
[reviewapp-strapi] [2021-09-07 07:38:31] Reusing layer 'config'
[reviewapp-strapi] [2021-09-07 07:38:31] Adding label 'io.buildpacks.lifecycle.metadata'
[reviewapp-strapi] [2021-09-07 07:38:31] Adding label 'io.buildpacks.build.metadata'
[reviewapp-strapi] [2021-09-07 07:38:31] Adding label 'io.buildpacks.project.metadata'

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @trangchongchengit ,
I recommend you check this page https://blog.logrocket.com/7-ways-to-improve-node-js-performance-at-scale/

It helped me in my previous application.

Tell me if it worked for you,
Cheers!