Lumo is a simple boilerplate for building Laravel applications. It comes with...
- Laravel 11
- TailwindCSS
- Livewire
- Breeze authentication
- FlyonUI components
Clone the project
git clone git@github.com:angus-boilerplates/Lumo.gitGo to the project directory
cd LumoIf you plan to develop using Laravel Sail you can follow these instructions.
Ensure you have Docker installed on your system
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqscp .env.example .envOpen your .bashrc or .zshrc file and add the following alias
alias sail="./vendor/bin/sail"
sail upThis will launch the compose project, new commands will need to be executed in a new terminal window.
sail artisan key:generatesail artisan migrate --seedsail npm installsail npm run devVisit the application in your browser at http://localhost
This app can be dockerized for deployment and testing in CI/CD pipelines.
The production image builds a production ready docker container with all the required services such as nginx, php-fpm etc.
docker build --target prod -t lumo-prod-image .Running the production image requires the container to have access to environment variables, these can be passed in using the -e flag.
Below is an example of running the container with the required environment variables.
docker run -d -p 9000:80 --name lumo \
-e APP_NAME=Lumo \
-e APP_ENV=production \
-e APP_KEY=base64:NHZpNnVnM2p0b2VmZnV6MDN1ZDJmeWt1bDJpemlxeDA= \
-e DB_CONNECTION=PUT_DB_CONNECTION_HERE \
lumo-prod-imageThe test image builds a container that is optimized for running tests, the entrypoint is set to run the tests and exit when complete.
docker build --target test -t lumo-test-image .Unlike the production image, the test image has environment variabes baked into the Dockerfile. So to run the tests you can simply run the image.
docker run --name lumo-tests lumo-test-imageIf you are using PHPStorm you can set up the PHP interpreter to use the Laravel Sail container.
- Go to
Settings>PHP>Test Frameworks - Click on
+and selectPHPUnit by Remote Interpreter - Click on
...next to "CLI Interpreter" - Click on
+and selectFrom Docker, Vagrant, VM, WSL, Remote... - Select
Docker Compose - Select
Serviceaslaravel.test - Click Apply and OK
- In the
PHHPUnit Librarysection ensure the "Path to script" is set to/var/www/html/vendor/autoload.php - Click Apply and OK
To be able to debug your application in PHPStorm you will need to set up Xdebug configuration in your .env file.
- Ensure the
SAIL_XDEBUG_MODE=develop,debug,coverageis set in the.envfile