Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You don't need separate containers to run nginx and php-fpm.


I too would like to see a properly configured php+php-fpm container benchmark. There's a lot of overhead when you link by http instead of a unix socket, in the same container.


Technically, you should be able to share a domain socket via a shared volume too (between an "app" and "web" container) - as with postgres:

https://github.com/sameersbn/docker-postgresql/issues/30#iss...

Curious about benchmarks and tests of TCP vs Unix domain sockets between docker containers.


Another example is API Platform's docker setup:

Volume config: https://github.com/api-platform/api-platform/blob/main/docke...

Caddy config: https://github.com/api-platform/api-platform/blob/main/api/d...

php-fpm config: https://github.com/api-platform/api-platform/blob/main/api/d...

I'm also curious on the performance differences between containers.


I found a simple comparison from 2014 - which shows Unix domain sockets to have a 2-3x advantage over localhost TCP:

"Unix Domain Sockets vs Loopback TCP Sockets"

https://nicisdigital.wordpress.com/2014/03/03/unix-domain-so...

Hn submission: https://news.ycombinator.com/item?id=37466475


Are you implying that docker containers don't run a unikernel that can only run one application at a time? /s


I am happily running Nginx + supervisord + several Python apps in a single Docker container.


Not gonna lie I tend to use docker like minimal disposable VMs from time to time lol


does it involve running supervisor inside the container? that’s fine but it’s definitely not kosher.

in my experience those are the ones that kick and scream when they don’t start as root.


php-fpm & nginx -g "daemon off;"


this is … not how I’d do it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: