T
T
t38c3j2019-08-13 19:23:04
System administration
t38c3j, 2019-08-13 19:23:04

How to properly communicate microservices across domains?

There are three containers nginx, php-fpm, mysql managed via docker compose v3. php-fpm serves several services just like nginx.
Let's say there are three services available on the host machine at the addresses service1.local, service2.local and service3.local which all lead to one container with nginx which in turn processes php through php-fpm. When requesting service1.local, requests must be made on the php backend side via curl to service2.local and service 3.local services by domains. How to actually do this without crutches like assigning a permanent nginx IP and prescribing domains using extra_hosts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-08-13
@inoise

Maybe service discovery in the form of HashiCorp Consul will help you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question