Application lifecycle management in Azure Container Apps Preview
The Azure Container Apps application lifecycle revolves around revisions.
When you deploy a container app, the first revision is automatically created. More revisions are created as containers change, or any adjustments are made to the template section of the configuration.
A container app flows through three phases: deployment, update, and deactivation.
Deployment
As a container app is deployed, the first revision is automatically created.
Update
As a container app is updated with a revision scope-change, a new revision is created. You can choose whether to automatically deactivate new old revisions, or allow them to remain available.
Deactivate
Once a revision is no longer needed, you can deactivate a revision with the option to reactivate later. During deactivation, the container is shut down.
Shutdown
The containers are shut down in the following situations:
- As a container app scales in
- As a container app is being deleted
- As a revision is being deactivated
When a shutdown is initiated, the container host sends a SIGTERM message to your container. The code implemented in the container can respond to this operating system-level message to handle termination.
If your application does not respond to the SIGTERM message, then SIGKILL terminates your container.