dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.7k stars 220 forks source link

Slow performance with Docker instalation on Windows. #953

Closed JakubJV closed 1 month ago

JakubJV commented 1 month ago

Hi, I'm trying to integrate Laravel with FrankenPHP and Octane into a fresh Laravel project on a Windows operating system. I'm following the Laravel documentation and creating a Docker image for FrankenPHP as described. The container is created and starts successfully, but the performance with FrankenPHP is worse than when I run the project using php artisan serve. I’m a bit new to this and am unsure if I'm doing something wrong. Could someone help me?

This is request with FrankenPHP franken

This is request when php artisan serve is running without Franken. artisan-serve Thanks in advance! :)

dunglas commented 1 month ago

If you are using a Docker volume, this is expected (and unrelated with FrankenPHP). Docker volumes on Windows slow down IO a lot because the data must be copied between two different file systems.

Closing as this is a Docker issue, unrelated with FrankenPHP.

JakubJV commented 1 month ago

So it´s unusable on Windows with docker. Okay, thanks for respond🙂

dunglas commented 1 month ago

You can use WSL instead of Docker. You can also dramatically improve the performance of Docker for Windows by sharing only what is strictly needed in the volume. But this is out of scope of this repository. Take a look to https://github.com/dunglas/symfony-docker for an example that works well on Windows using Symfony and FrankenPHP.

JakubJV commented 1 month ago

You can use WSL instead of Docker. You can also dramatically improve the performance of Docker for Windows by sharing only what is strictly needed in the volume. But this is out of scope of this repository. Take a look to https://github.com/dunglas/symfony-docker for an example that works well on Windows using Symfony and FrankenPHP.

Thanks for advice! :)