I am trying to deploy an application prototype to openshift. It works locally with mongodb at 127.0.0.1. I am trying to get it to respect process.env.OPENSHIFT_MONGODB_DB_URL
when in the openshift environment but that variable is not accessible to my nodejs cartridge at runtime.
I can see that it is being set in my application's shell environment. When I do rhc ssh
and then export
I see OPENSHIFT_MONGODB_DB_URL=[full_url_with_password]
and it all looks good.
But when, in my node.js application, I call process.env.OPENSHIFT_MONGODB_DB_URL
it returns undefined
.
To double check, I did a console.log(util.inspect(process.env))
from within my node.js app, and what I saw was different from what I see within my appication's secure shell. No OPENSHIFT_MONGODB_* variables were in the environment that is exposed to my node.js app.
How can I access variables across different cartridges? Or is this a configuration error?