Answer the question
In order to leave comments, you need to log in
How to deal with static files in docker container with php-fpm?
Docker's philosophy is "one process, one container". There is a php application with a front. Those. inside there is php code, js, css and a couple of small pictures. We have created a docker image based on php-fpm and started php-fpm itself. Linked it to external nginx. Php code works. But how do they get through to static files now? I saw containers with nginx inside and it produces pictures. But what about the PHP application?
For good, it would be necessary to divide into front and backend. But now it is impossible)
In the same way with workers. You need to keep the supervisor so that he keeps tasks. Make a separate container for workers or put fpm and circus in one container?
Answer the question
In order to leave comments, you need to log in
Raise a container with nginx next to it, give statics and dynamics to the higher front through it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question