Laravel5.8 & MySQL8.0のDocker開発環境
Dockerを利用した Laravel Echo Server の開発環境
- PHP7.3
- MySQL8.0
- nginx
- composer
- redis
- node
- php-worker
$ git clone https://github.com/nakanakamu0828/docker-laravel-mysql
$ cd docker-laravel-mysql
$ docker-compose up -d --build
$ git clone [github repogitory url] src
$ docker-compose run composer install
$ docker-compose exec app sh
$ cp -p .env.example .env
$ sed -i -e "s/DB_HOST=.*/DB_HOST=db/" .env
$ sed -i -e "s/REDIS_HOST=.*/REDIS_HOST=redis/" .env
$ php artisan key:generate
$ docker-compose exec app sh
$ sed -i -e "s/MAIL_HOST=.*/MAIL_HOST=mail/" .env
$ sed -i -e "s/MAIL_PORT=.*/MAIL_PORT=1025/" .env
$ php artisan tinker
Mail::raw('test mail',function($message){$message->to('test@example.com')->subject('test');});
$ docker-compose exec app sh
$ php artisan migrate
$ 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