Settings
Settings are configured using environment variables. The following settings are available:
ORMAGIC_DATABASE_URL
: The URL to the database. Defaults tosqlite://db.sqlite3
.ORMAGIC_JOURNAL_MODE
: The journal mode to use for SQLite. Defaults toWAL
.
To use a database other than SQLite, you need to set the ORMAGIC_DATABASE_URL
environment variable (for now, only SQLite and PostgreSQL are supported, but more databases will be added in the future). For example, to use PostgreSQL, you need to set the ORMAGIC_DATABASE_URL
environment variable like below:
ORMAGIC_DATABASE_URL=postgresql://user:password@localhost/dbname