- Docker
- Laravel 9
- PHPUnit Test
- Ensure you have Docker installed and that http://localhost[:port] can access the containers once set up (in our docker-compose, we configure port 4545 on the host to forward to the nginx's port 45)
Special case for Linux on Windows, read here: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly#install-docker-and-docker-compose-within-wsl
- Clone the github repository into your local dev folder.
- Copy contents from file
.env.example
to.env
. If yor are using docker keep DB Connection properties as it is. - Run
docker-compose up -d --build
- -d - Run as Deamon
- --build - If your image has not been created, it will create new image
- Once you setup docker you can login to the container with
docker-compose exec app bash
- Cool..... So far you are good if you are able to login to docker terminal. 2 more steps.
- Run
composer install
- Yes All done
- Login to the container with
docker-compose exec app bash
- Run
./vendor/bin/phpunit