Comment puis-je configurer DNS pour que mon conteneur php-fpm sache envoyer certains hôtes au conteneur nginx avec docker-compose?

#1
I have two containers:

nginx

php71-fpm

I have these two that work great.

I have a REST API that I am developing, it is a different project.

I need my web application to be able to send API calls to this local.api.myproject.com

However, php-fpm doesn't know how to fix it.

Should I set up a DNS server container and make php-fpm use the DNS server?

And does the DNS server route specific hosts to nginx and then it all rolls back to Google 8.8.8.8?

TweakboxDoes anyone have an example of how to achieve this with docker-compose?
 
Dernière édition:
Haut