Skip to content

Configuration File ​

Every key portico.yaml accepts. Unknown keys are errors.

Top Level ​

KeyDefaultDescription
runtimeautoContainer runtime: auto (Docker, else Podman), docker or podman.
proxyThe proxy in front of the services (see below).
servicesThe services, by name.

Proxy ​

KeyDefaultDescription
port4400Port Portico listens on.
host0.0.0.0Address Portico listens on.
base/Prefix mounted in front of every route. Must start with /.
enginebuiltinbuiltin, or nginx for production parity.
imagenginxImage for the nginx engine, when nginx isn't installed.
tag1.30.5-alpineTag for the nginx engine's image.
cors["*"]Origins allowed to call Portico cross-origin; [] leaves CORS to your app.

A cors entry is *, an http or https origin, or an origin with a leading *. in the host to match any subdomain.

Services ​

KeyKindsDescription
runrunShell command to start; {port} becomes the port, also set as PORT.
dirrunDirectory to run the command in, relative to portico.yaml.
imageimageContainer image to run.
tagimageImage tag.
composecomposeCompose file to bring up, relative to portico.yaml.
servicecomposeThe single compose service to start and route.
routescomposePaths for individual compose services; not with service. Each starts with /.
portallThe port it listens on; none for a run service that serves nothing.
routeallPath to mount it at (default: /<name>). Must start with /.
stripallRemove the route prefix before forwarding (default: true).
hostallpreserve forwards the browser's Host instead of localhost:<port>.
quietallKeep its output off the screen (default: false).
logallWrite its output to .portico/logs/<name>.log (default: true).

A service sets at most one of run, image and compose; with none, it's a service you start yourself.

Rules ​

  • port is required for image services and for services you start yourself.
  • port: none is only valid with run, and a service without a port can't have a route.
  • With compose, port needs service, and must be a port that compose service publishes.
  • A key outside its kinds is an error, such as dir on an image service.
  • Service names start with a letter or digit, use a-z, 0-9, _, . and -, and can't be portico or nginx.

Released under the MIT License