1
0
Fork 0
forked from mirror/prosody
prosody/conf.d/02-storage.cfg.lua
Sara Aimée Smiseth 80216c5fdc
Add support for postgres, mariadb/mysql databases (#23)
* Add environment variables for Database configuration.
* Install postgres and mysql dependencies.
* Test refactoring
* Run tests for prosody with postgres and also for prosody with sqlite.
* Add tests that check if postgres or sqlite is used.
2021-05-07 14:06:29 +02:00

22 lines
539 B
Lua

default_storage = "sql"
sql = {
driver = os.getenv("DB_DRIVER");
database = os.getenv("DB_DATABASE");
host = os.getenv("DB_HOST");
port = os.getenv("DB_PORT");
username = os.getenv("DB_USERNAME");
password = os.getenv("DB_PASSWORD");
}
-- make 0.10-distributed mod_mam use sql store
archive_store = "archive2" -- Use the same data store as prosody-modules mod_mam
storage = {
-- this makes mod_mam use the sql storage backend
archive2 = "sql";
}
-- https://modules.prosody.im/mod_mam.html
archive_expires_after = "1y"