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.
This commit is contained in:
Sara Aimée Smiseth 2021-05-07 14:06:29 +02:00 committed by GitHub
parent 5bcf0fd3d0
commit 80216c5fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 153 additions and 49 deletions

View file

@ -1,7 +1,12 @@
default_storage = "sql"
sql = {
driver = "SQLite3";
database = "prosody.sqlite";
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