The mongodb
cartridge provides MongoDB on OpenShift.
The mongodb
cartridge provides several environment variables to reference for ease
of use:
OPENSHIFT_MONGODB_DB_HOST The MongoDB IP address
OPENSHIFT_MONGODB_DB_PORT The MongoDB port
OPENSHIFT_MONGODB_DB_LOG_DIR The path to the MongoDB log directory
For more information about environment variables, consult the OpenShift Application Author Guide.