paint-brush
How to Set Up a Local Dev Environment Using Landoby@kanchansonwani
779 reads
779 reads

How to Set Up a Local Dev Environment Using Lando

by kanchan sonwaniMay 25th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Lando is an amazing tool and it's so handy; just a few commands and you are ready to run your project locally or set up a new project on your machine. It's a tough job when we need to set up for the project locally; it's nightmare sometimes sometimes sometimes. So here is the solution: Lando. It's open source built on Docker. It is trending and most of the developers use it. The steps are almost similar to other machines as well. Make sure that Hyper-V is enabled.

Company Mentioned

Mention Thumbnail
featured image - How to Set Up a Local Dev Environment Using Lando
kanchan sonwani HackerNoon profile picture

Well, this is pretty easy to work in IT if You know the correct tools and their uses. It's a tough job when we need to set up for the project locally; it's nightmare sometimes. What if you couldn't run the project properly, and need to struggle with a lot of dependencies?

So here is the solution:

Lando

Lando is an amazing tool and it's so handy; just a few commands and you are ready to run your project locally or set up a new project on your machine.

It's open source built on Docker. I assume that many developers know this amazing tool, it is trending and most of the developers use it.

Requirements

  • Docker
  • Lando
  • System of your choice( I am using windows 10 home and this document is based on this specific system only however steps are almost similar to other machines as well. Make sure that Hyper-V is enabled(to check: task manager->performance-> search for virtualization:enabled)for more info on enabling virtualization check this link 


Step 1: Download Lando Files

Choose this file docker-compose-Windows-x86_64.exe from the link.

Note
: 
Lando gives the option to install docker at the same time while you run the Lando installation file(however you need to configure docker after that, if you have already docker installed then don't choose the option and complete the installation.) 

Install Lando from the downloaded file by double-clicking it and complete the process.

Step 2: Open CMD Terminal

Create a directory for your project and then 

-

 lando init //
inside your project directory

Choose from given options (from where you want Lando to download or clone your codebase like from GitHub, pantheon, or langoon)

Basically, choose the place where Lando downloads your codebase and initiate .lando.yml file for it. If you have already downloaded your codebase then go to that project and follow the step again but this time choose "current working directory" from the given options.

Once you've done the above option, choose a recipe for your project like WordPress or Laravel, etc. (know which recipe your project has built-in).

Then:

lando start //
under the main project directory

It'll give you a local server and database server to run your project locally

If you see BOOMSHAKALAKA on your terminal, you are good to go and can run the project.

To check what servers on which your project is running, go to docker dashboard->see your project webroot name->click the arrow to view.