My local (pc) development is:
- Ubuntu LTS 16.04
- Docker version 17.12.0-ce, build c97c6d6
- docker-compose version 1.8.0
I’m trying to build a simple web app front end (first container) that talks with a node js back end (second container).
in docker compose file I have two services: web and nodeservice.
When I try to call from web the rest service exposed by nodeservice, I get an error if I use the url nodeservice:3000/api, instead it’s ok when I use localhost:3000/api
The first question is: if this behavior is correct, and I can understand it, how can I do when I deploy it in production (swarm, cluster, …)? That is what I write inside web app html: localhost or nodeservice?
The second question is: which suggestion to local develop such apps like that?
Thanks in advance.