Add database config to processor and middleware