This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Build for Windows
ucan-lab edited this page May 8, 2020
·
8 revisions
$ git config --global core.autocrlf false
Build a new Laravel project.
$ git clone [email protected]:ucan-lab/docker-laravel-alpine.git
$ cd docker-laravel
$ cp .env-example .env
$ 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
It is assumed that Laravel is already installed.
$ git clone [email protected]:ucan-lab/docker-laravel.git
$ cd docker-laravel
docker .env
file
PROJECT_PATH=./src
$ docker-compose up -d --build
$ docker-compose exec app composer install
$ docker-compose exec app cp .env.example .env
$ docker-compose exec app php artisan key:generate
$ docker-compose exec app php artisan migrate:fresh
$ 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 -u $$MYSQL_USER -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
use Illuminate\Support\Facades\Redis;
Redis::set('name', 'hoge');
Redis::get('name');
$ docker-compose exec redis redis-cli
$ docker-compose down --volumes --rmi all
$ docker-compose up -d --build