D
D
dake12312019-06-03 12:03:05
Docker
dake1231, 2019-06-03 12:03:05

How to send a request to another microservice in a docker container?

Good afternoon, there is a docker-compose file with services service1, service2, postgresdb, nginx-proxy. All http requests go to nginx-proxy, there is no web server on service1, service2, only php-fpm. Everything works great from the host machine, but now how to make an http request from service1 to service2 through nginx-proxy? There is an option to write something like service1 to the hosts file.
service2 nginx-proxy
But what if there are a lot of services or no rights for editing. Is there a way out?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2019-06-03
@petermzg

https://docs.docker.com/compose/compose-file/#extr...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question