Database service
PostgreSQL Server
The PostgreSQL Server integration deploys a brand-new PostgreSQL server instance to the provider of your choice — Docker, Neon, Render, Supabase, Railway, or DigitalOcean — and exposes server-level operations like database management and version info.
PostgreSQL Server is one of the Database service integrations. It handles its own webhook route:
/postgres-server/webhookWhat it does
On DEPLOYMENT_CREATED the service provisions a dedicated PostgreSQL server with the selected provider and reports its connection string back to Dreambase. Where the PostgreSQL integration creates a database on an existing server, this integration creates the server itself.
Providers
The provider input selects where the server is deployed:
- docker (default) — a local container, for development.
- neon — serverless Postgres via the Neon API.
- render — a managed instance on Render.
- supabase — a Supabase project's Postgres.
- railway — a Postgres service on Railway.
- digitalocean — a managed database cluster on DigitalOcean.
Provider-specific inputs
Each provider reveals only its relevant inputs. Cloud providers need an API token (e.g.neonApiKey, renderApiKey, supabaseAccessToken, railwayApiToken or railwayProjectToken, doApiToken) plus optional naming, region, version, and plan fields; docker takes a host port and password. Most fields auto-generate sensible defaults when left blank.Inputs
| Input | Applies to | Description |
|---|---|---|
provider | all | Where to deploy the server (default docker). |
port | docker | Host port to bind. Auto-assigned from 5433 if not provided. |
password | docker, railway | Superuser password. Auto-generated if not provided. |
neonApiKey, projectName, regionId, pgVersion | neon | Neon API key plus optional project name, region, and Postgres version. |
renderApiKey, name, plan, region, pgVersion | render | Render API key plus optional instance name, plan, region, and version. |
supabaseAccessToken, supabaseOrgId, name, plan, region, dbPassword | supabase | Supabase access token and org id plus optional project settings. |
railwayApiToken / railwayProjectToken, railwayProjectId, railwayEnvironmentId | railway | An account/team token or a project token, the target project, and environment (defaults to production). The server is exposed via a Railway TCP proxy so its URL is reachable. |
doApiToken, doName, doRegion, doSize, pgVersion | digitalocean | DigitalOcean token plus optional cluster name, region, node size, and version. |
Outputs
url— the PostgreSQL server connection string.port— the port the server is listening on (Docker only).provider— the provider used to deploy this instance.
Functions
Server-level operations, callable via a FUNCTION_CALL event:
listDatabases— list all databases on the server.createDatabase— create a new database on the server.dropDatabase— drop a database from the server.getServerVersion— get the server's PostgreSQL version.
Events it handles
WEBHOOK_CHALLENGE— verify the webhook endpoint.HEALTH_CHECK— confirm the server is reachable.DEPLOYMENT_CREATED— provision the server and return its connection details.DEPLOYMENT_DELETED— tear the server down.DOWNLOAD_STARTED— signal that a build/download has begun.FUNCTION_CALL— run a named server function.