Question

Manually deploy specific component in App Platform

Hello,

I successfully deployed a Stapi app backend and a Next,js front end using App Platform. I am using doctl to manually force a deploy after a change is made in Strapi to regenerate Next.js. On the App Platform dashboard, I have a component for the Strapi Web service, Next js Static Site, and a database. Is there a way to target only the Next.js static site component using doctl to force a deploy? ex:doctl apps create-deployment <app-id> /?/component-name/?/ --force-rebuild . Redeploying the entire app including the strapi backend is causing problems.

if targeting a forced deploy only on one component is not possible, can I use the Dockerfile to exclude the build on a manual attempt?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @dibarra

Q: Is there a way to target only the Next.js static site component using doctl to force a deploy?

A: No, it is not possible to only deploy one component in your App using the below command.

doctl apps create-deployment <app-id> /?/component-name/?/ –force-rebuild 

Q: if targeting a forced deploy only on one component is not possible, can I use the Dockerfile to exclude the build on a manual attempt?

A: You can not exclude the build phase when deploying manually using a Dockerfile. If you want to skip the build process you need to build your container image and upload it to DockerHub/DigitalOcean Container Registery (DOCR) and use those to deploy your App. It will skip the build phase as the image is already built. You can visit the link below for deploying an App using container image.

Deploying App using Container Image