I'm running a node.js app on openshift and I'd like to add a storage volume.
Using the only UI I've already created a persistent volume claim, and added that volume under my deployment with the "Add Storage" button.
Because my application relies on access to this storage, I have the following in my node.js code:
if (!('OPENSHIFT_DATA_DIR' in process.env)) {
console.log(process.env);
throw new Error('Can\'t access data directory');
}
This error is thrown upon deployment, and upon reviewing the output of console.log(process.env)
there doesn't seem to be any environment variable describing a path for persistent storage.
How can I get a value for process.env.OPENSHIFT_DATA_DIR
?