Skip to main content

What is staging mode?

Staging mode lets you test a ready update through Tinfoil’s staging ingress before manually promoting it. It is intended for validating a tag before it replaces the currently serving instance.

When to use staging mode

  • Validating a new release tag before switching production traffic
  • Pinning a long-lived test instance to a specific tag
  • Manually controlling promotion of ready updates instead of relying on the automatic blue-green flip

How it works

Staging containers use the same production certificate flow as normal containers. The difference is in update promotion: production containers auto-promote a ready update to live traffic, while staging containers hold it on the staging ingress until you manually promote or cancel it. When an update for a staging container becomes ready, the existing instance continues serving production traffic. The ready update candidate remains available through the Tinfoil staging ingress until you promote or cancel it. Staging mode is independent from debug mode — a container can be in staging, in debug, in both, or in neither.

Deploying a staging container

  1. In the All Containers tab, click New Container
  2. Configure the container as normal
  3. Tick the Staging checkbox above the launch button
  4. Click Deploy in Staging
You can also tick Staging in the Update Instance dialog or the Start Container dialog to deploy a new tag straight into staging without touching production.

Updating a staging container

To pick up a new tag on a staging container, click Update, select the tag, and click Deploy in Staging. If a staging update candidate becomes ready while the container itself is already in staging, click Promote Update to switch traffic to the staged instance, or Cancel Update to discard it.

Promoting to production

A staging container shows a Deploy to Prod button in its action sidebar. Click it to relaunch the container with the same tag and configuration in production mode. The new instance goes through the normal blue-green relaunch flow and, once ready, is marked as the GitHub latest release. This is the recommended path. If you instead want to deploy a new tag directly to production, open the Update dialog, leave the Staging checkbox unchecked, and click Update — the same end-state is reached. The GitHub latest release is bumped only when the post-deploy mode is neither staging nor debug.

Setting a repository default

Set staging as the default for new instances and deployment-wide updates:
Repository updates inherit this setting unless you pass --staging true or --staging false:

Using the CLI

The Tinfoil CLI supports the same staging flow: