uncloud db, scoped to the app in the current directory,
and the databases resource for everything else.
uncloud db add
Provision a PostgreSQL database for the linked app and print its credentials.
The database is named after the app (
myapp-db), so db env can find it again
later. An app must exist first — run uncloud deploy before db add.
uncloud db env
Reprint the credentials for the app’s existing database. Creates nothing..env-shaped output:
DATABASE_URL_READ_ONLY.
Other engines
db add provisions PostgreSQL. For MySQL, Redis, or MongoDB, create the
database directly:
Then read its connection details:
Connecting an app
Databases are not exposed to the public internet — an app reaches one over the project’s internal network. Take the host fromcredentials and set it as
environment on the app: