Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions content/docs/infrastructure-as-code/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,23 @@ const api = service("api", {

Database provisioning is handled by Railway product workflows. The configuration file describes the database intent; you do not need to attach a volume to managed database helpers yourself.

### Public TCP proxies

Database helpers take no networking options. Author public exposure on the helper result. `railway config pull` writes this line for a database that already has a TCP proxy:

```ts
const db = postgres("postgres");
db.networking = { tcpProxies: { "5432": {} } };
```

To assert that a database has no public proxy, declare an empty map. The plan stays clean while none exists and shows `Update postgres networking` when a proxy is added outside the file:

```ts
db.networking = { tcpProxies: {} };
```

A database without a `networking` block keeps whatever proxies it has.

## Volumes

Create a persistent volume with `volume(name, config)` and attach it to a service with `volumeMounts`:
Expand Down