T
T
topuserman2021-11-05 17:39:01
PHP
topuserman, 2021-11-05 17:39:01

Docker: php-fpm and nginx - where to mount the application?

I want to deploy the infrastructure of a web project.
I use php-fpm + nginx.
Initially, I mounted my project code in a container with nginx (in /var/www/html).
Now studying the examples, I see that many people mount in the same php-fpm (also in /var/www/html).
And for some, it is mounted in both containers at once (to the same place /var/www/html).

Can you please tell me if there are any recommendations on where to mount it? What's the Difference?
or is it necessary to mount in both containers for correct operation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-05
@topuserman

In both. Nginx will distribute statics, and PHP-FPM will execute scripts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question