Question

Manually deploy specific component in App Platform

Posted June 28, 2021 254 views
DigitalOcean App PlatformStrapiNext.js

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?

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 @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