Downloads
Stars
Version
Set up a Docker-based local development environment for your Laravel project with an artisan preset command.
Default:
Optional:
You should have Docker installed on your machine and be familiar with docker-compose
commands.
Read an overview of the docker-compose CLI
Install the package via composer:
composer require --dev mattwills23/laravel-preset-docker
Run the preset
command with the docker
option:
php artisan preset docker
docker-compose
commandsStart the environment:
ocker-compose up -d
Stop the environment:
ocker-compose down
Use artisan:
ocker-compose exec app php artisan
Use composer:
ocker-compose exec app composer
Use npm:
ocker-compose exec node npm
Run tests:
ocker-compose exec app phpunit
See a list of available commands:
ocker-compose --help
I originally planned on releasing this as part of a Laravel project "starter" repo, containing a Laravel installation, this docker setup, my go-to packages, etc. Instead I'm going to break that repo down into multiple presets. This should be more useful to the community as you can then pick and choose which presets to use, and you'll be able to install this docker setup on projects already underway.
Be on the lookout for the the following presets that I plan on releasing:
And a "starter" preset which will install all of my presets in a single command.
This project is licensed under the MIT License - see the LICENSE.md file for details