F
F
frant1c2017-05-17 12:31:02
SAP
frant1c, 2017-05-17 12:31:02

How to deploy MongoDB in a docker container on SAP Cloud Foundry with public port 27017?

Good afternoon, I'm trying to deploy a publicly available MongoDB instance from a docker container in Cloud Foundry, I took konstruktoid / mongodb, but I tried other containers.

Application "Running", host: sapcodermongo.cfapps.us10.hana.ondemand.com If you
go to the application address, the message "It looks like you are trying to access MongoDB over HTTP on the native driver port." is displayed.
But in order to connect, port 27017 must be available, I tried several shells and a driver for .NET., I tried to specify the host and ports 80, 443, 27017 - there is an error everywhere. How can I make the native port of MongoDB available at sapcodermongo.cfapps.us10.hana.ondemand.com:27017?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JGeorge, 2017-05-27
@JGeorge

Perhaps the error is due to the fact that by default port 27017 is not used for http requests, but only for access through native MongoDB drivers.
And how important is it to use MongoDB through a docker image?
There is another way - the mongodb service from the CloudFoundry marketplace. Here is a list of commands that are used to connect a service to an application:
* cf marketplace - get the plan name (plans column) of the service
* cf create-service mongodb - create a service instance
* cf bind-service - bind a service instance to an application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question