Integrating Laravel, Docker and Docker-Compose
-
Add to
composer.json
composer require 'x3tech/laravel-shipper' '>=0.5'
-
Add the provider to
config/app.php
'providers' => array( ... 'x3tech\LaravelShipper\Provider\ShipperProvider' );
-
If using MySQL, set host to
db
indatabase.php
-
If using beanstalkd, set host to
queue
inqueue.php
-
Generate the
docker-compose.yml
config file./artisan shipper:create:all
-
Build and start the containers
docker-compose build && docker-compose up
-
Wait until the containers are started, and visit http://localhost:8080
docker-compose run --rm app <command>
Examples
Artisan:
docker-compose run --rm app ./artisan
PHPUnit:
docker-compose run --rm app vendor/bin/phpunit