Build Laravel's development environment using docker. PHP7.3/MySQL8.0/nginx/composer/redis/node
$ git config --global core.autocrlf false
$ git clone git@github.com:ucan-lab/docker-laravel.git
$ cd docker-laravel
$ docker-compose up -d --build
$ docker-compose exec app composer create-project --prefer-dist "laravel/laravel=6.0.*" .
$ docker-compose exec app composer require predis/predis
$ docker-compose exec app php artisan migrate
$ docker-compose exec app ash -l
$ cp .env.example .env.testing
$ php artisan key:generate --env testing
$ sed -i -e 's/<php>/<php>\n <env name="DB_HOST" value="db-testing" force="true"\/>/' phpunit.xml
$ ./vendor/bin/phpunit
$ docker-compose exec app php artisan tinker
Mail::raw('test mail',function($message){$message->to('test@example.com')->subject('test');});
$ docker-compose exec app composer dump-autoload
$ docker-compose exec db bash -c 'mysql -uroot -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}'
$ docker-compose exec node npm install
$ docker-compose exec node npm run dev
$ docker-compose exec node yarn
$ docker-compose exec node yarn dev
$ docker-compose exec app php artisan tinker
Redis::set('name', 'hoge');
Redis::get('name');
$ docker-compose exec redis redis-cli
$ docker-compose down --volumes --rmi all
$ docker-compose up -d --build
$ docker-compose exec app php artisan migrate
$ git clone git@github.com:ucan-lab/docker-laravel.git
$ cd docker-laravel
$ docker-compose up -d --build
$ git clone <source code url>
$ docker-compose exec app composer install
$ docker-compose exec app ash -l
$ cp .env.example .env
$ php artisan key:generate
$ php artisan migrate:fresh