inframan.yaml sits at the root of your repository and describes your application: its services, how each one is built, how it scales, what it’s connected to, and how any of that differs between environments. It’s the source of truth. Inframan reads it on every release, and settings you change in the console are written back to it through a pull request.
A minimal file
inframan.yaml
./Dockerfile and listening on port 8080.
A complete example
inframan.yaml
app-pool, an active domain api.example.com, PostgreSQL and Redis add-ons named main and cache, an infrastructure secret stripe-key and an env group shared-config.
Top-level fields
The application’s name. It must match the name the application was created with, and it can’t change afterwards.
The Kubernetes namespace the application’s services run in. Defaults to the application name. It can’t change afterwards.
The application’s services, keyed by service name. At least one is required. See Service fields.
Values substituted for
{{NAME}} in your pipelines’ pre-deploy and post-deploy commands. Top level only: they can’t be set per environment. See Pipelines.The default rollout for every service. See
rollout under Release.Service fields
Basics
web: an HTTP service that receives traffic onport.worker: a long-running process with no inbound traffic, such as a queue consumer.job: runs to completion once per release.
The port a web service listens on. Required for
web. Inframan sets the PORT environment variable to it, so don’t set PORT yourself. These ports are reserved by the platform: 8012, 8022, 8112, 9090, 9091, 15020, 15021 and 15090.The application node pool the service runs on. Required when the infrastructure has more than one application pool, and filled in for you when it has exactly one. See Node pools.
Overrides the image’s command. It runs as
/bin/sh -c "<start_command>", so the image needs /bin/sh. Don’t use double quotes inside it.Build
The build context, relative to the repository root. Empty means the repository root. In a monorepo, set it to the service’s directory, or leave it empty if the
Dockerfile needs files from sibling directories.Routing
The public hostname for a web service, such as
api.example.com. The domain must already be active on the same infrastructure. Without a domain, a service is only reachable from inside the cluster. See Custom domains.The path under
domain that routes to this service, such as /api. Several services can share one domain on different prefixes.Scaling
Resources
Network and health checks
Environment
Env groups to attach, by name. A group listed later wins over one listed earlier.
Environment variable name to infrastructure secret name, for example
STRIPE_KEY: stripe-key. The value is read from your cloud’s secret manager at deploy time.Environment variable name to the thing it connects to. Inframan fills in the value:
postgres/<instance>,redis/<instance>: the add-on’s connection URL.storage/<instance>: the bucket’s name.service/<application>/<service>: the internal URL of another web service.
Release
How long a replica gets to finish its work after it’s asked to stop, from 1 to 3600 seconds.
Environment overrides
A service can change its settings per environment underenvironments.prod or environments.nonprod. The infrastructure’s tag decides which one applies.
inframan.yaml
Several applications in one file
A repository can hold more than one application. Instead ofapplication: and services:, list each one under applications:, keyed by application name:
inframan.yaml
Validation
- When you create an application, an invalid file is refused, with the reason.
- When you push, an invalid file fails the release before anything is built, and the error is on the release’s page.
- If a branch you push has no
inframan.yaml, the release fails and Inframan opens a pull request that adds one.
Unknown keys are ignored rather than rejected, so a misspelt field has no effect. If a setting doesn’t seem to apply, check its spelling against this page.