What to use when
Tinfoil Containers supports two different kinds of configuration values:Measured env values are set in
tinfoil-config.yml. CLI and Admin API variables are a separate saved per-instance map. Secret values are managed outside the config in the dashboard or API.tinfoil-config.yml and selecting it for a deployment are separate steps. The declaration identifies the environment variable expected by the container. During deployment, select every declared secret that should be injected. With the CLI, pass each name using --secret NAME.
Environment variables
Config File
Define environment variables in theenv field of your container configuration file:
tinfoil-config.yml
Dashboard
During deployment, the dashboard displays the environment variables (and secret names) defined in yourtinfoil-config.yml. These values are read-only. To change them, update the config file in your repo and release a new version via the Tinfoil Release workflow.
The CLI --variable KEY=VALUE flags and Admin API variables object set a separate per-instance map. When supplied to start or relaunch, they replace that entire saved map; omitted variables preserve it. They do not replace the measured env values in the selected release.
Reserved variables
DOMAIN is a reserved environment variable set to your container’s public domain. Tinfoil populates it automatically at deploy time and uses it to bind the enclave’s attested identity and TLS certificate to your domain, and to scope request validation. You don’t need to set it — and you shouldn’t define your own DOMAIN in env, since it’s managed for you.
Secrets
Secrets are stored in AWS Secrets Manager and injected into your container as environment variables at deploy time. They are not exposed in the dashboard UI or your Git repository.Scopes
Organization secrets are available to every repository in your organization. Repository secrets are available only to containers deployed from oneowner/repo.
The same name can exist in different repositories, with a different value in each. A name cannot be shared between organization and repository scope within the same organization.
Creating
To create an organization secret:- Go to the Secrets tab in the Containers section of the dashboard
- Click Add Secret
- Enter a name (e.g.
DATABASE_URL) and value - Click Save
Referencing
List secret names in thesecrets field of your container spec. At deploy time, Tinfoil resolves each name from the container’s repository secrets or the organization secrets:
tinfoil-config.yml
Updating
Edit a secret’s value in the Secrets tab or the repository’s Repository secrets section at any time. Updating a secret does not automatically update running containers. To pick up the new value you must redeploy. CPU-only and single-GPU instances use the blue-green flow without downtime; multi-GPU instances use a disruptive delete-and-queue update.Deleting
You cannot delete a secret that is referenced by any container in its scope. The dashboard shows which containers are using it. Remove the secret from those deployments, then delete it.Using the CLI
The Tinfoil CLI manages organization secrets withtinfoil secret:
--secret NAME on tinfoil container create, relaunch, or start. See the CLI secrets section for details.
