Updated to store config in the db, not file

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>