project
A human-readable project identifier used for grouping related services.
Relay can start Postgres, Redis, MySQL, and Mongo as companion containers on the same Docker network as your app. The app receives connection URLs automatically, and the dashboard can list the live services.
{
"project": "myapp",
"services": [
{ "name": "db", "type": "postgres", "version": "16" },
{ "name": "cache", "type": "redis", "version": "7" },
{ "name": "web", "type": "app" }
]
}`relay.json` is read from the repo root. It is separate from `.relay.json` and `relay.config.json` because it describes the runtime topology of the deployed project, not CLI defaults or buildpack overrides.
A human-readable project identifier used for grouping related services.
A list of named service containers like Postgres, Redis, MySQL, Mongo, and the main app service.
The service name becomes the hostname on the Docker network. Type and version select the image and default URL wiring.
The network name follows the deploy slot, so the app container and its companion services can resolve each other by hostname. Relay also injects connection URLs into the app container so you do not have to hand-wire the obvious cases.
Reachable from the app as `db` inside the network.
Reachable from the app as `cache` inside the network.
Injected when a database service exists.
Injected when a cache service exists.
DB_URL=postgres://postgres:postgres@db:5432/app
CACHE_URL=redis://cache:6379
MONGO_URL=mongodb://mongo:27017/appRelay keeps these containers near the app because the goal is convenient companion services for previews and self-hosted environments. Persistent named volumes keep database state between container restarts.
Created as relay-<app>-<env>-<branch>.
Used for Postgres, MySQL, Redis, and Mongo persistence.
Lists projects with live services and connection strings.
Shows running companion containers and copyable URLs.
GET /api/projects
[
{
"app": "demo",
"services": [
{ "name": "db", "type": "postgres", "connection_url": "postgres://..." }
]
}
]