Skip to content

Conversation

@Kemi-Elizabeth
Copy link
Collaborator

Added app life cycle page (about hooks)

Why

Closes #5185

What's changed

New page has been added to Learn section about hooks and application lifecycle.

Where are changes

/learn/overview/app-life-cycle.html

Updates are for:

  • platform (sites/platform templates)
  • upsun (sites/upsun templates)

added app life cycle page
@Kemi-Elizabeth Kemi-Elizabeth self-assigned this Nov 7, 2025
@Kemi-Elizabeth Kemi-Elizabeth linked an issue Nov 7, 2025 that may be closed by this pull request
Automatically optimized images using optipng and jpegoptim via GitHub Actions
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Your Upsun Fixed environment has successfully deployed. 🚀

See the changed pages:

Upsun Fixed docs
Upsun docs

description: "Understand the {{% vendor/name %}} application lifecycle and learn how to use build, deploy, and runtime hooks to control app behavior"
---

Hooks let you run custom commands at specific points in your application’s lifecycle during [`build`, `deploy`](/learn/overview/build-deploy.html), or `runtime`. They’re essential for setting up your app, managing graceful shutdowns, or preparing instances to handle traffic in autoscaling environments.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads weird to me. it's like it's missing some word after runtime :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ricardokirkner i've adjusted this sentence so it reads a bit better.

|------|------|-----------|--------------|
| **pre_start** | string | No | Runs just before `start`. Useful for short setup actions that must run per instance, such as moving cache files or setting permissions. |
| **start** | string | Yes | The main command that launches your app. If it terminates, {{% vendor/name %}} restarts it immediately. |
| **post_start** | string | No | Runs after the `start` command but before the container is added to the router. This lets you complete warm-up tasks before the app starts handling traffic. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention here that if post_start is defined, instances won't start getting traffic routes to them until that script finishes successfully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important to the customer experience—is this a blocking hook or not?

Could this be addressed by a Boolean column such as "Freezes/Holds Requests"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ricardokirkner @tylers-username i've added a boolean column to address whether its a blocking or non blocking hook

Copy link
Contributor

@tylers-username tylers-username left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kemi-Elizabeth - proposed a change

@Kemi-Elizabeth Kemi-Elizabeth dismissed stale reviews from tylers-username and ricardokirkner November 20, 2025 14:55

Addressed changes and adjusted content accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New page to be added about hooks

6 participants