Last active
August 22, 2024 21:56
-
-
Save jon3laze/a2fb8c9dce1da83cd49da64032007b66 to your computer and use it in GitHub Desktop.
Laravel Project Init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############### | |
| #Clone project | |
| ############### | |
| git clone <project> | |
| cd <project> | |
| ############################### | |
| #Install Composer dependencies | |
| ############################### | |
| docker run --rm --interactive --tty -v $(pwd):/app composer install --ignore-platform-reqs | |
| ####################### | |
| #Configure environment | |
| ####################### | |
| cp .env.example .env | |
| # Add db credentials to .env before launching container | |
| ####################### | |
| #Launch Sail container | |
| ####################### | |
| ./vendor/bin/sail up -d | |
| ########################## | |
| #Install NPM dependencies | |
| ########################## | |
| sail npm install | |
| ################## | |
| #Generate app key | |
| ################## | |
| sail artisan key:generate | |
| ################## | |
| #Migrate and seed | |
| ################## | |
| sail artisan migrate --seed | |
| ########################## | |
| #Build styles and scripts | |
| ########################## | |
| sail npm run dev | |
| ############## | |
| #Link storage | |
| ############## | |
| sail artisan storage:link | |
| ########### | |
| #Run tests | |
| ########### | |
| sail phpunit # ./vendor/bin/phpunit | |
| ################## | |
| #Watch and update | |
| ################## | |
| sail npm run watch |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for Sail