Skip to content

yogesh16/pet-shop-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐳 PetShop Docker

Docker container for PetShop Laravel Application.

This docker configuration contains

  • Nginx
  • MySQL
  • PHP
  • Redis
  • Composer
  • NPM
  • Artisan
  • Mailhog

🚨 Important

Before run create mysql directory inside docker folder to persist data

Run Project using Docker

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

Default Admin Credential

Username: [email protected]
Password: password

Running Tests

To run tests

  docker-compose run --rm artisan test

Useful Docker Commands

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

Acknowledgements

About

API application for Pet Shop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published