Hacker News new | ask | show | jobs
by pyr0hu 971 days ago
> - You don't need to use Docker because PHP is pretty stable target.

Not sure I agree with this. Upgrading PHP versions or managing extensions can be _sometimes_ a PITA, using Docker makes it easier. but for simpler apps, sure, apt install php and a few extensions, and you are good to go.

OTOH - a bit off though - I still haven't figured out how to properly build a php stack with Docker. Do I add an nginx instance to each app image? Or should the app container expose only the FPM? If I'd have to do it nowadays, I'd probably go with the second.

1 comments

here is an example, https://github.com/visualex/docker-boilerplate-nginx-apache-... not using FPM but Apache, but you can see how nginx fits into the picture, you would be doing something like a fastcgi_pass testsite:9000; using the names in the referenced repo.