Report this

What is the reason for this report?

[digitalocean][app_platform] How the "Job" component affects the deployment process?

Posted on January 31, 2025

Hey!

In the Digital Ocean App Platform docs I was unable to find info about, how the “Job” component could affect my deployment flow on APP_PLATFORM when it is set to PRE_DEPLOY i found in app spec reference, will it cancel the whole deployment process, or will it just happen, and not affect the deployment flow at all?

Thanks for the answers in advance!

Bendeguz



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!

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.

Hey Bendeguz!

Great question! When you set a Job component to PRE_DEPLOY on DigitalOcean App Platform, it runs before your app deployment starts. If the job fails, the entire deployment process should be canceled, meaning your app won’t be updated to the new version.

If the job succeeds, the deployment continues as usual. This is useful for tasks like database migrations or environment setup steps that need to be completed before the main app is deployed.

If you don’t want the job to block deployments, you can either:

  • Run it as a POST_DEPLOY job instead (so it runs after the app is updated) or FAILED_DEPLOY job.
  • Handle errors within the job itself and make sure it exits with a success status (0) even if something minor fails.

You can check out the docs here:

https://docs.digitalocean.com/products/app-platform/how-to/manage-jobs/

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.