Configurations
Using an External Database
Presenton supports connecting to external databases (PostgreSQL or MySQL) via the SQL_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.
Configuration Details
SQL_URL
(Optional)
- Purpose: Defines the connection URL for an external database to store presentation data, user configurations, or other application-related information.
- Behavior: If
SQL_URL
is not provided or is invalid, Presenton defaults to using a local SQLite database for storage. - Supported Databases:
- PostgreSQL: A robust, open-source relational database suitable for production environments.
- MySQL: A widely-used relational database for scalable applications.
- Format: Use standard connection strings for the respective database:
- PostgreSQL:
postgresql://user:password@host:port/dbname
- MySQL:
mysql://user:password@host:port/dbname
- PostgreSQL:
Examples
To configure Presenton to use an external database, set the SQL_URL
environment variable in your environment configuration:
-
PostgreSQL Example:
user
: Database usernamepassword
: Database passwordhost
: Database host (replace with your server’s hostname or IP)5432
: Default PostgreSQL portmydb
: Name of the database
-
MySQL Example:
user
: Database usernamepassword
: Database passwordhost
: Database host3306
: Default MySQL portmydb
: Name of the database