Skip to content

linkextractor-api should expose port 5000 only inside container,#11

Open
ldelaprade wants to merge 1 commit intoibnesayeed:step4from
ldelaprade:step4
Open

linkextractor-api should expose port 5000 only inside container,#11
ldelaprade wants to merge 1 commit intoibnesayeed:step4from
ldelaprade:step4

Conversation

@ldelaprade
Copy link

hence replacing 'ports' with 'expose' in docker-compose.yml.
This would imply a small change in
play-with-docker.github.io/_posts/2018-09-22-microservice-orchestration.markdown
as well to explain the nuance.
So this should be replace as well:

We should now be able to talk to the API service as before:
curl -i http://localhost:5000/api/http://example.com/

with something like
The PHP web server will access the API which is no longer exposed outside the container.

hence replacing 'ports' with 'expose' in docker-compose.yml
@ibnesayeed
Copy link
Owner

Thanks for the PR and your thoughts. However, this was an intentional one to allow the API service be exposed publicly the very same way the PHP application is, so that someone who wants to write their own application, they can use the API endpoint instead.

While making this change will not necessarily make much difference in the lesson, but it will not bring anything new to the table either. So, it will be an extra work of changing the lesson and getting that reviewed, merged, and deployed.

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