By Marin
I have a monorepo that contains few services, one services takes really long time to build but i dont change its code very ofter. the main service i mostly work on, when i want to deploy it, all other services need to be rebuilt even through their codebase wasn’t changed. how can i add some rule to resuse old image or something when to conditionally run the build step.
vercel has something like this, where you can provide custom shell command by which you can decide will the build be skipped or not
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I think that the App Platform doesn’t currently support conditional builds or build skipping based on file changes like Vercel does. It rebuilds all services on deploy, even if only one changed, especially in a monorepo setup.
One workaround might be to split your services into separate components or repos if possible. That way, only the changed service triggers a build. Or, if you’re using Dockerfile-based builds or using a Docker registry with a pre-built image.
https://docs.digitalocean.com/products/app-platform/reference/dockerfile/
If you’re hitting limits or slow builds often, it’s worth dropping a note to https://do.co/support, maybe they can suggest something based on your setup.
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.