postgres
Configuration of a managed PostgreSQL instance.
The runtime resolves the effective image using the following priority
order: image (if set) takes precedence; otherwise version is
expanded to postgres:<version>-alpine; if neither is set the
runtime picks its own default.
The database field must match ^[a-z][a-z0-9_]{0,62}$ and is
validated by [crate::Manifest::validate].
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
database | string | no | Initial database name created at first startup. Must match ^[a-z][a-z0-9_]{0,62}$. Defaults to the resource name when unset. | |
depends_on | array of string | no | Names of other resources this instance must wait for before starting. | |
healthcheck | Healthcheck | no | Healthcheck override. Replaces the built-in pg_isready check. See [Healthcheck] for field semantics and defaults. | |
image | string | no | Explicit image reference. Takes precedence over version. Use this to pin a specific digest or to point to a private registry. | |
password | string | no | Superuser password. The runtime generates a random password when this is unset and exposes it via ${resources.name.password}. | |
port | integer | no | Host port the container port 5432 is mapped to. The runtime chooses a random free port when unset. | |
user | string | no | Superuser account name. Defaults to "postgres" when unset. | |
version | string | no | PostgreSQL major version, e.g. "16". Expanded into postgres:<version>-alpine when image is absent. Ignored when image is set. | |
volume | Volume | no | Persistent volume configuration. See [Volume] for the accepted forms. Defaults to an auto-named volume when unset. |