Skip to main content
Modelence Cloud runs managed MongoDB, PostgreSQL and Redis databases next to the app. Each one is created in the environment’s region, its connection string reaches the app as an environment variable, and it is backed up in production. A database is a resource in modelence.config.json, and env passes its connection string to the app:
modelence.config.json
A url output is the full connection string, over TLS. The other outputs are its parts, for clients that read them separately. The reference lists every plan and output.

Lifecycle

A deploy creates every managed resource the file declares that the environment doesn’t have yet, and the new version starts only once they are ready. Resources are matched by name, so the same file works in every environment:
  • A resource that already exists is kept as it is, with its data. plan is read only when the resource is created, so changing it later has no effect.
  • A resource removed from the file is not deleted, and it is billed until it is.
  • Renaming a resource creates a new, empty one, and the old one stays until it is deleted.
Deleting a managed resource permanently deletes its data and its backups.

Databases hosted elsewhere

An app can also use a database hosted somewhere else, such as Supabase, Neon or PlanetScale. Keep its connection code and declare its URL and keys in env as secrets.