Windows vs WSL2 for dev environment
# ❓questions
m
windows vs WSL2 for dev environment. Chime in with your environments. so far I was learning to use Sail inside of WSL2 since long term I would prefer to run this site in a containerized fashion, likely on a cloud platform eventually. where will initial setup for dev be simpler?
i
I'm not a windows user but when I do I definitely go for WSL2. Your production container will most likely be Unix based so always best to work in dev with that environment too
m
makes sense, thanks @ifox appreciate the quick help to the questions
j
I moved from mac to windows and WSL2 is probably a must. I used docket but did not like the performance so now i just run a server on linux using WSL2. As soon as you get WSL2 up and running it's a breeze to use. Windows not so much for laravel i do use visual studio for .net projects in that case windows is the way to go. 😛
For me performance was notable as soon as i was running docker, adobe xd, phpstorm and alot of browser tabs. Docker was eating up ram and alot of disk space on top of that.
Now i installed mysql on WSL ubuntu 20.04 and php, node etc. and there is a artisan command to run a php development server. Command is php artisan serve
for 99% of the cases this is sufficient for my current use
I do think docker is overhyped to be honest. If you get a grip on linux and how webservers work it's not that hard to run a dev env yourself. You have to get use to doing everything in your command line. I use windows terminal from the windows store which is great. Creating database will be done using the terminal for example.
and the neat thing about phpstorm is that it has it's own mysql gui build in with which you can acces your databases.
But is you have a beast laptop or pc docker is fine when using it with new laravel projects. I have alot of older projects which are not configured using docker and i hate making my own docker configs because it feels like it always take 10 times more than in your own linux.
m
and I am indeed starting new projects from scratch, so not doing it now would put me in your old projects that aren't configured scenario so best off to do it this way