Fundamentals

Databases

Databases belong to a project and are shared by the apps that use them.

Provisioning not available yet

Databases can be added to apps and are recorded, but not created. No connection details are passed to the app. A database stays in the state requested until provisioning is available.

A project has at most one database per kind. Apps that request the same kind share it. The canvas shows each database with the number of apps using it.

copperfox
Live
cinderrock
Live
postgres
used by 2 apps
Two apps requesting PostgreSQL share the project's PostgreSQL database.

Kinds

DatabaseConsole versionsCLI and lily.toml
PostgreSQL17, 16, 15postgres
MySQL8.4, 8.0mysql
MariaDBmariadb
MongoDB8.0, 7.0mongodb
Redis7.4, 7.2redis
SQLitesqlite

Add a database

  • Console: select Add Database on the app card during configuration. LILY also proposes databases detected in your code.
  • CLI: pass --db <root>=<kind> to lly deploy, or list databases in lily.toml.

With provisioning, a database moves through the states requested, provisioning and ready.

On this page