Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme changes for docker #22

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

kamorahul
Copy link

readme contain the docker setup required

readme contain the docker setup required
@jmikola jmikola mentioned this pull request Jul 11, 2017
README.md Outdated

You just have to add the mongo uri in config.php and run commands :
```
$ docker build -t <your-docker-account>/mongoqp .
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is <your-docker-account> supposed to be replaced with? If docker build supports Git repositories with tags, wouldn't that be preferable?

we can run it directly with any account

You just have to add the mongo uri in config.php.dist and run commands :
```
$ docker build -t mongoqp .
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Configuration section above already mentions that config.php.dist can be copied to config.php and customized as needed. It seems reasonable that we can include the same directions here instead of suggesting that users modify config.php.dist.

That would also allow COPY src/config.php.dist /mongoqp/src/config.php to be removed from Dockerfile in #21.

then run it using

```
$ docker run -p 8080:8080 mongoqp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's clear you're setting up port forwarding here. I'm not familiar with Docker's networking configuration, but is there any risk that the application within the container would have trouble connecting to a MongoDB server running outside of it (as is likely to be the case for most all users)?

Since the driver's default connection URI is "mongodb://127.0.0.1:27017", I'm wondering if that will look for a MongoDB server within the Docker container or outside the container on the host machine. If the default URI points to a server within the container, what URI should be used to connect to a server on the host machine? I don't think we need to change the defaults, but this might be something worth documenting if it's likely to be a common question.

@kamorahul
Copy link
Author

It's clear you're setting up port forwarding here. I'm not familiar with Docker's networking configuration, but is there any risk that the application within the container would have trouble connecting to a MongoDB server running outside of it (as is likely to be the case for most all users)?

Currently my Docker is running on IP 172.17.0.2 and my machine is on 192.168.1.67. my mongo is running on the host machine and I am able to connect to that. apart from this we can connect with any machine outside

Since the driver's default connection URI is "mongodb://127.0.0.1:27017", I'm wondering if that will look for a MongoDB server within the Docker container or outside the container on the host machine. If the default URI points to a server within the container, what URI should be used to connect to a server on the host machine? I don't think we need to change the defaults, but this might be something worth documenting if it's likely to be a common question.

we need to check the ip of host machine and have to provide it in URI is the best and easy option. changing readme for the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants