Integrating Laravel, Docker and Docker-Compose
-
Add to
composer.jsoncomposer 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
dbindatabase.php -
If using beanstalkd, set host to
queueinqueue.php -
Generate the
docker-compose.ymlconfig 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