yongjhih / docker-parse-server

Provide docker images and docker stack for parse-server npm versions and latest commit
https://hub.docker.com/r/yongjhih/parse-server/
Apache License 2.0
475 stars 166 forks source link

When deploying to heroku, mongodb by mlab url is not set to DATABASE_URI #49

Closed vmlinz closed 8 years ago

vmlinz commented 8 years ago

Cause:

When deploying to heroku, mongodb env of mlab is named MONGODB_URI, but the parse server expects url from DATABASE_URI. So users will encounter error access to mongodb from localhost of heroku app, this makes client not able to read or write any data.

Solution:

  1. Manually set DATABASE_URI to content of MONGODB_URI
  2. Try read MONGODB_URI when deploying to heroku

Br, Nick

vmlinz commented 8 years ago

After reading the source code of index.js,

The real cause of the issue might be the name change of mlab mongodb env name from MONGOLAB_URL to MONGODB_URL.

Reference:

https://devcenter.heroku.com/articles/mongolab#getting-your-connection-uri

Br, Nick