scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

Realms does not respect database config #137

Closed nakato closed 8 years ago

nakato commented 8 years ago

Using the realms-wiki.json that realms-wiki setup generates, I set DB_URI as mysql+mysqldb://realms:QWERTY@127.0.0.1/realms, however a sqlite database is generated at /tmp/realms.db.

The expected outcome is /tmp/realms.db is not created and the database is used from what is set at DB_URI.

A temporary workaround is setting the SQLALCHEMY_DATABASE_URI to the same string as DB_URI in realms-wiki.json

This is caused by SQLALCHEMY_DATABASE_URI = DB_URI, when DB_URI updates, SQLALCHEMY_DATABASE_URI remains set to the value DB_URI was previously.

ghtyrant commented 8 years ago

Can confirm. Workaround works, thanks!