Build Laravel's development environment using docker. PHP7.3/MySQL8.0/nginx/composer/redis/node
$ git clone [email protected]:ucan-lab/docker-laravel5.git
$ cd docker-laravel5
$ docker-compose up -d --build
$ docker-compose exec app composer create-project --prefer-dist "laravel/laravel=5.8.*" .
$ docker-compose exec app composer require predis/predis
http://127.0.0.1:10080
or
http://localhost:10080
or
curl -s http://localhost:10080/ -o /dev/null -w '%{http_code}\n'
$ 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('[email protected]')->subject('test');});
$ docker-compose exec app composer dump-autoload
$ docker-compose exec db bash -c 'mysql -uroot -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}'
$ docker-compose run node npm install
$ docker-compose run node npm run dev
$ docker-compose run node yarn install
$ docker-compose run node yarn run 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 [email protected]:ucan-lab/docker-laravel5.git
$ cd docker-laravel5
$ 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