- This project follows the PSR-2 coding style.
- Ensure your editor supports
.editorconfig
(check https://editorconfig.org if you don't know).
This project uses Laravel Sail to provide a consistent development environment. It also uses Laravel Octane & RoadRunner as the application server in both development and production.
You will need Docker installed, WSL 2 if you are on Windows and approximately 2GB of free storage for Sail.
The following steps must be done within Linux. Sail is not supported on Windows, which is one of the reasons why WSL is required.
- Clone the repo.
- Start Sail using
./vendor/bin/sail up
(or./vendor/bin/sail up -d
to run in detached mode). - Connect to the Sail container using
./vendor/bin/sail shell
. - Do
./vendor/bin/rr get-binary
to fetch the RoadRunner binary for Laravel Octane. exit
the Sail container.- Stop Sail using
./vendor/bin/sail down
. - Add Execute permissions for the newly downloaded RoadRunner binary using
chmod +x ./rr
. - Rebuild the Sail image using
./vendor/bin/sail build --no-cache
. - Start Sail again (as written in Step 2).
From this point, you just start and stop Sail using the aforementioned commands. Steps 3 - 8 only need to be done once.
To view a full list of Sail commands, just do ./vendor/bin/sail
You can also make an alias for ./vendor/bin/sail
-> sail
by adding the following to your .bashrc
:
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
If you have issues setting up Laravel Sail, please visit https://laravel.com/docs/10.x/sail