Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jjudge's avatar

Lumen docker image - server together with PHP or not?

I'm setting up an application with a number of lumen microservices using docker/docker-compose.

At the moment I have Nginx and PHP-FPM together in each container. It kind of makes sense to keep these close together.

One problem I have is that I cannot find a way to send the logs from lumen out to stdout of the container. Nginx sents its logs to stdout, but lumen logs just disappear when I send them to /proc/stdout or php::/stdout or any combination of these things. Is this because Nginx and PHP-FPM are in the same container? If they were split into separate containers, then would the PHP-FPM container have no problem sending its logs to stdout without nginx getting in the way?

Secondly, when I have many of these running together, how do they get paired up? I may have ten PHP-FPM containers, each served by one of ten Nginx containers, so would I need to be explicit with the ports each use to pair them up? Or are there standard ways to handle all that wiring together at time of instantiation using K8S or similar?

0 likes
0 replies

Please or to participate in this conversation.