Docker container for PetShop Laravel Application.
This docker configuration contains
- Nginx
- MySQL
- PHP
- Redis
- Composer
- NPM
- Artisan
- Mailhog
Before run create mysql
directory inside docker
folder to persist data
Clone repo using following command
git clone https://github.com/yogesh16/pet-shop-api.git
cd pet-shop-api
To start docker container
docker-compose up -d --build petshop
Install dependency
docker-compose run --rm composer install
Copy .env file
cp src/.env.example src/.env
Migrate database
docker-compose run --rm artisan migrate --seed
-
Project URL :
http://localhost:8088
-
Swagger API Documentation :
http://localhost:8088/api/swagger
-
Currency Exchange Swagger API Doc :
http://localhost:8088/currency-exchange-rate/api/documentation
-
Maihog :
http://localhost:9025
Default Admin Credential
Username: [email protected]
Password: password
To run tests
docker-compose run --rm artisan test
To add new composer package
docker-compose run --rm composer require package-name
To install node dependency
docker-compose run --rm npm install
To Run PHP Insights
docker-compose run --rm artisan insights
To Run Larastan
docker-compose run --rm composer run phpstant
To Generate Swagger
docker-compose run --rm artisan l5-swagger:generate
To stop container
docker-compose down