switch to couchdb env vars