How to prevent redeployment in a monorepo?

Posted May 31, 2021 195 views
Node.jsGitDigitalOcean App Platform

Hi everyone,

I have a Node based backend app deployed on the App platform. This app is located in a monorepo together with my frontend.
Currently when any files are changed and pushed in the frontend directory, the backend will also redeploy.

My ideal situation would be that the backend will recognize that there are no file changes in the backend directory, and therefore not redeploy. This is currently the case for my frontend on Netlify, is something similar possible on Digital Ocean?

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

Hello @lem0ndragon ,

From looking at the use case, when the frontend and backend are linked to single app spec then any changes will redeploy entire app. If there is no changes in build specs, then the build will be skipped however deployment will happen. Currently, there is no way to deploy only one component however this is something you can suggest in ideas page for our team to review it.

If either deploy on push feature is enabled for your App or you do manual deployment, it will build the whole App Spec.

Sri Charan