4 ms·
You don't need separate containers to run nginx and php-fpm.
by conradfr 3y ago
You don't need separate containers to run nginx and php-fpm.
- wongarsu 3y agoAre you implying that docker containers don't run a unikernel that can only run one application at a time? /s
- kobalsky 3y agodoes 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.
- martinsnow 3y agoI 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.
- e12e 3y agoTechnically, 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#issuecomment-401520497 https://github.com/sameersbn/docker-postgresql/issues/30#iss... Curious about benchmarks and tests of TCP vs Unix domain sockets between docker containers.
- rob-olmos 3y agoAnother example is API Platform's docker setup: Volume config: https://github.com/api-platform/api-platform/blob/main/docker-compose.yml#L41 https://github.com/api-platform/api-platform/blob/main/docke... Caddy config: https://github.com/api-platform/api-platform/blob/main/api/docker/caddy/Caddyfile#L47 https://github.com/api-platform/api-platform/blob/main/api/d... php-fpm config: https://github.com/api-platform/api-platform/blob/main/api/docker/php/php-fpm.d/zz-docker.conf#L6 https://github.com/api-platform/api-platform/blob/main/api/d... I'm also curious on the performance differences between containers.
- e12e 3y agoI 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-sockets-vs-loopback-tcp-sockets/ https://nicisdigital.wordpress.com/2014/03/03/unix-domain-so... Hn submission: https://news.ycombinator.com/item?id=37466475 https://news.ycombinator.com/item?id=37466475