Laravel example app
- Make
- Composer
- Docker
- Docker Compose
Create containers and conf files for test and run the app.
make setup
Run the app at http://localhost
make run
make test
PHPUnit 9.5.20
Inventory Model (Tests\Feature\InventoryModel)
✔ Get user inventory
Inventory Controller (Tests\Feature\InventoryController)
✔ Get user inventory
✔ Get user inventory sku
✔ Get user inventory product id
Products Controller (Tests\Feature\ProductsController)
✔ Can get user products
✔ Can get user product
✔ Can updated user product
✔ Fails update with invalid input with data set #0
✔ Fails update with invalid input with data set #1
Time: 00:04.973, Memory: 36.50 MB
OK (9 tests, 93 assertions)
Create docker-compose.override.yml
file and add:
version: '3.1'
services:
db:
image: mysql/mysql-server
webserver:
image: arm64v8/nginx
To use MySQL
and NGINX
ARM64 based images. php:7.4-fpm
image arch-version used for the main app
should be automatically pulled using the local arch.