4 ms·
Does anyone really deploy PHP directly on servers still..? Running it in a Docker container is the simplest thing possible, runs anywhere, and has top-notch per
by 9dev 5y ago
Does anyone really deploy PHP directly on servers still..? Running it in a Docker container is the simplest thing possible, runs anywhere, and has top-notch performance.
- snov 5y agoI meant Docker. The fact that I needed multiple processes (nginx+fpm) made PHP setup tricky compared with e.g. Java with embedded server.
- 9dev 5y agoI know what you mean; that has been a problem in the past. In case you have to again, I'd recommend looking into either Roadrunner or Swoole. That makes it possible to have your application run more or less standalone in a single container, hosted by a native application server. This boosts performance incredibly, and exposes a single HTTP port, as it should be. For Symfony: https://github.com/k911/swoole-bundle https://github.com/k911/swoole-bundle For Laravel: https://laravel.com/docs/8.x/octane https://laravel.com/docs/8.x/octane
- snov 5y agoaha, that looks good. Thanks
- jbboehr 5y ago> The fact that I needed multiple processes (nginx+fpm) I believe you can have fpm listen on TCP and run nginx in another container if you want, although I haven't tried it so I can't vouch for it.
- snov 5y agoYup, tried that. It’s a bit too complex imho but works too.