DEV Community

Cover image for Mastering Upsun Deployment hooks and commands ⚓
Flora Brandão for Upsun

Posted on

Mastering Upsun Deployment hooks and commands ⚓

Figuring out exactly when and where your code executes during a deployment can feel like a guessing game. If you are struggling to choose between build hooks and deploy hooks, you are not alone.

Upsun uses specific phases to shape how your app deploys. Understanding these hooks helps you manage runtime and traffic flow effectively. Here is the breakdown:

  • The build hook is strictly for preparation and has no access to the runtime environment
  • Pre start, start, and post start hooks execute every single time your application starts
  • The deploy hook runs once and finishes before any traffic reaches your app
  • The post deploy hook triggers once traffic is already flowing
  • Your choice of mount type will change how these hooks behave

Check out the full technical write-up to see which hook fits your specific workflow:

Upsun deployment hooks and commands: which one to use, and when - Upsun Developer

Build hooks, deploy hooks, pre_start, start, and post_start all shape how Upsun deploys your app. Learn what each one does and when to reach for it.

favicon developer.upsun.com

Top comments (0)