ibnesayeed / linkextractor

A Docker tutorial using a link extraction application example
https://training.play-with-docker.com/microservice-orchestration/
MIT License
51 stars 55 forks source link

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

Open ldelaprade opened 4 years ago

ldelaprade commented 4 years ago

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.

ibnesayeed commented 4 years ago

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.