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:
Top comments (0)