Skip to content

Latest commit

 

History

History
142 lines (93 loc) · 2.04 KB

README.md

File metadata and controls

142 lines (93 loc) · 2.04 KB

$ Moneys

Run in Postman

Api doc

Api documentation

📈 Sequence diagram

⬆️ Dependencies

  • Docker 19.03.5+
  • Docker Compose 1.23.1+

Make sure the following ports are avaliable in your server

  • Port 8000 For Backend API
  • Port 3306 For database

💚 Building the environment

Clone this repository

https://github.com/michelpl/stock-api.git

Enter in repository folder

cd hiring-challenge

Run de follwing command

make install

💚 Building the environment (manually)

Clone this repository

https://github.com/michelpl/stock-api.git

Enter in repository folder

cd moneys

Create the .env file

Use .env.example as example

cp src/.env.example src/.env

Running services

docker-compose up -d

Get the composer dependencies

docker-compose exec webapi composer update -vvv

Running Laravel migrations

docker-compose exec webapi php artisan migrate

⏪️ Stoping services

make stop

or

docker-compose down

🚀 Running Scheduled Tasks Manually

docker-compose exec webapi php artisan schedule:run 

The Hiring Challenge API will be avaliable on

http://localhost:8000/api

🧑‍💻 Consuming the API

Run in Postman

🧑‍💻 Development environment

For changing project files in your machine, you need to run the following permissons

$ find src/ -type d -exec chmod 775 {} \;
$ find src/ -type f -exec chmod 664 {} \;
$ chown -R www-data:$USER src

or

make permissions

✅ Running tests

make test

or

docker exec -it webapi php artisan test

🔊 Logs

You can find all the api logs on src/storage/logs

Or just executing the following command

make show_logs