This repository contains APIs for the Pet Shop (eCommerce). The project uses docker compose to minimise the setup process. Each directory in the project signifies a single function and is mounted in the appropriate containers.
Directory Structure
The build directory contains instructions for building a container. It provides us with a logical separation of build steps.
The config directory contains configuration attached to containers. It helps us to persist the configuration even when the containers are rebooted.
The data directory contains container related data. It helps us to persist the application specific data even when the containers are rebooted.
The repository directory will contain the Laravel application.
Note: Please note that this docker setup should only be used for development purposes and by no means should be deployed to production.
- Docker
- Docker Compose
- Port 80 should be available for Nginx
- Port 3306 should be available for MySQL
- Nginx
- PHP 8.2
- MySQL 8.1
- Laravel 10
- Laravel Tests
- Larastan Static Code Analysis
Execute the below command:
docker-compose exec up -d
docker-compose exec php8 bash
cp .env.example .env
composer install
php artisan key:generate
Keys for JWT can be generated using:
php artisan jwt:keys
php artisan migrate
Localhost: http://localhost
Virtual Host: http://api.pet-shop.test
Note: Please make sure the host file has the correct entry.
Thank you!