2

I set up an app using Laravel Sail, and hosted it in my C:Users/User/my_app folder, however API endpoints were terribly slow (around 7s to respond).

I decided to move my application to the WSL filesystem. I copied my_app folder to \\wsl$\Ubuntu-20.04\home folder. However, when I type ./vendor/bin/sail up command nothing happens. No error message, no "command not found message", nothing.

I tried changing home/my_app permissions as well as vendor/bin/sail permissions but it has not helped me. I have no idea how to solve this problem as I am not receiving any message from the console.

greenbanzai
  • 79
  • 2
  • 7
  • Sail basically uses docker-compose. Verify that you have docker-compose available. If you have docker compose try `docker-compose up` and check any errors. – xuma Dec 26 '21 at 20:05

1 Answers1

1

I think I solved the issue with copying the files from Windows to WSL using cp command run from WSL console (cp /mnt/c/users/..... ).
However I stubmled upon this error Laravel & Docker: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied which I solved using the answers from this github thread https://github.com/aschmelyun/docker-compose-laravel/issues/49.
Now my endpoint response times are usually under 100ms.

greenbanzai
  • 79
  • 2
  • 7
  • Please read this answer to solve the permission issue: https://stackoverflow.com/questions/50552970/laravel-docker-the-stream-or-file-var-www-html-storage-logs-laravel-log-co/68904763#68904763 – Rob Mascaro Mar 14 '22 at 04:23