First of all, you must copy the configuration of the docker-compose.yml.default file to docker-compose.yml
cp docker-compose.yml.default docker-compose.ymlIf you have docker and docker-composer installed, just run the containers:
docker-compose up -dTo shut down the conbtainers, simply:
docker-compose stopThe next step is to configure the development environment
cp .env.example .envInstall the dependencies
docker-compose exec app composer installConfigure your database connection (edit .env file)
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=your_mysql_root_password
Generate encryption key and Configure cache
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan config:cacheFinally, it is necessary to execute the migrations and optionally the seeder.
docker-compose exec app php artisan migratedocker-compose exec app php artisan db:seedExecute phpunit
docker-compose exec app php -n vendor/bin/phpunit --testdoxOptionally, we can create a coverage documentation in HTML format
docker-compose exec app php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-text --coverage-html ./public/test-coverage