This command executes a local deployment of your Magento 2 application. It does it in the following steps:
Prepare your project for Magento 2.
Install and compile correct PHP version with required extensions to run Magento 2.
Deploy services, Redis, MySQL, ElasticSearch and Nginx, in Docker containers for Magento 2.
Install Magento 2 with Composer.
Setup Magento 2.
Open a browser with up and running Magento 2 store.
A port to run your application on.
yarn start --port <port> # for Yarnnpm run start --port <port> # for NPM
Disable auto-open of a browser window at the end of the workflow.
yarn start --no-open # for Yarnnpm run start --no-open # for NPM
Enable XDebug for debugging PHP.
yarn start --debug # for Yarnnpm run start --debug # for NPM
Skips Magento setup.
In a nutshell, this option enables start command will just restart services and PHP-FPM, so if you need to restart the project it can be done in under 10 seconds*.
yarn start --skip-setup # for Yarnnpm run start --skip-setup
* Tested on Ryzen 9 3900x system with NVME SSD with a result in 9.5s.
Imports database dump to the MySQL container.
Does the same thing as the import-db command but allows to use it during start, so the project can be bootstrapped from zero in 1 command.
yarn start --import-db ./dump.sql # for Yarnnpm run start --import-db ./dump.sql
yarn start # for Yarnnpm start # for NPM