Anything else

Your own build, a script, or an app that is already built.

On this page

Moorage runs anything that serves HTTP on a port: say how to build it, if it needs building, and what to run.

Build on the server#

The command runtime runs your build command, with extra toolchains on the PATH — installed by Moorage (go, node, python, uv) or, with @system, the server's own:

[app]
name = "reports"
runtime = "command"
toolchains = ["java@system"]

[build]
command = "./gradlew --no-daemon installDist"

[processes.web]
command = "build/install/reports/bin/reports --port $PORT"
health = { path = "/health" }
moor deploy

A Procfile (web: … lines) can stand in for [processes].

Run it as it is#

The binary runtime runs the uploaded files without building them — a script for an interpreter on the server, for instance:

[app]
name = "tool"
runtime = "binary"

[processes.web]
command = "./server.py"

To upload something you built elsewhere, such as in CI, deploy the build's output with --artifact and the [processes] of the moorage.toml in the current directory:

moor deploy --artifact ./dist --app tool

gRPC#

A gRPC server speaks HTTP/2 with no TLS, and nothing else, so say so:

[processes.web]
protocol = "h2c"

Clients reach it at its address like anything else. With TLS, they use https as a browser would, and with no TLS, as on your own computer, they speak HTTP/2 from the first byte. Streams work in both directions, and trailers come through, which is where gRPC says how a call went.

Moorage reads none of it, so that a failed call is still a 200 in the metrics, and its gates apply as they do to anything: a sign-in gate means a browser's sign-in, which is no use to a program, so an API token or public suits a gRPC server better.

The health check is a TCP connection to $PORT by default. health.path asks a path over HTTP/2, for a server that answers one, and a server with only gRPC services has none. Behind a proxy, the proxy has to speak HTTP/2 to Moorage: with nginx, that is grpc_pass to the plain port.

What every app gets#

Suggest a change to this page