Presenton supports connecting to external databases (PostgreSQL or MySQL) via the DATABASE_URL
environment variable. If no external database is specified, it defaults to a local SQLite database, ensuring flexibility for both lightweight and scalable deployments. This section explains how to configure an external database and the fallback to SQLite, based on the provided configuration details and Presenton’s architecture.
DATABASE_URL
(Optional)DATABASE_URL
is not provided or is invalid, Presenton defaults to using a local SQLite database for storage.postgresql://user:password@host:port/dbname
mysql://user:password@host:port/dbname
DATABASE_URL
environment variable in your environment configuration:
user
: Database usernamepassword
: Database passwordhost
: Database host (replace with your server’s hostname or IP)5432
: Default PostgreSQL portmydb
: Name of the database
user
: Database usernamepassword
: Database passwordhost
: Database host3306
: Default MySQL portmydb
: Name of the database