I’ve become a big fan of using Lando for constructing my local dev environment. Lando is, as its website says, “a free, open source, cross-platform, local development environment and DevOps tool built on Docker container technology and developed by Tandem. Designed to work with most major languages, frameworks and services, Lando provides an easy way for developers of all skill levels to specify simple or complex requirements for their projects, and then quickly get to work on them.”
First of all you need to configure some settings such as the name of your application and your database port. Go to your .lando.local.yml
file and add your configurations.
name: laravel-example
services:
database:
portforward: 13306
proxy:
appserver:
- laravel-example.lando.site # You can add custom domain like *example.local*
If you add a custom domain that is not ending in lando.site
for example laravel-example.local
you have to update /etc/hosts
file like 127.0.0.1 laravel-example.local
. Please read the Lando Documentation for more info.
To start building lando env for lando, simple go to your directory which contains the .yml files and in the terminal run the following commands.
$ lando start
$ lando new-project
$ lando restart
$ lando info ## To see the info about your environment like database credentials.
The lando new-project
will install your laravel fraimwork in the www directory.
Boomshakalaka!! Don't forget to update your .env
file with correct database credentials.
$ lando new-project # Creates a new laravel application files in the www directory.
$ lando install-node # Installs node for the current container not to the global dir
$ lando run-npm
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.