Code Monkey home page Code Monkey logo

laravel-microservice-projecta's Introduction

laravel-microservice-projectA

Dockerized Laravel9 Project
Docker Images
php:8.1-fpm | mysql:8.0 | phpmyadmin/phpmyadmin | nginx:latest | redis:3.0

Getting Started

  1. Make sure up and running the laravel-microservice-projectB microservice in your machine first. Unless http://api.microservice-b.test:8084/api/v1/customer/list this link work in your browser. Use below command to clone laravel-microservice-projectB and follow the instruction of the README.md file
    git clone https://github.com/gihandilanka-github/laravel-microservice-projectB.git
  2. Clone the repo (laravel-microservice-projectA)
    git clone https://github.com/gihandilanka-github/laravel-microservice-projectA.git
  3. Go inside the cloned directory
    cd laravel-microservice-projectA
    
  4. Configure the .env file
    cp .env.example .env
    
  5. Run this command to up docker containers
    docker-compose up -d --build
    
  6. Run composer install
    docker-compose exec app composer install
    
  7. Generate APP_KEY in .env
    docker-compose exec app php artisan key:generate
    
  8. Add these two records to /etc/hosts file
    127.0.0.1    api.microservice-a.test
    127.0.0.1    pma.microservice-a.test
    
  9. Open the phpmyadmin in the browser. You can see the microserviceA database
    http://pma.microservice-a.test:8081
    
  10. Give these laravel directory permissions
    sudo chmod -R 777 storage/logs/
    sudo chmod -R 777 storage/framework/
    
  11. You can check the following API url, it will return the customers as json response
    http://api.microservice-a.test:8082/api/v1/customer/list
    

Note:

When we call this http://api.microservice-a.test:8082/api/v1/customer/list endpoint, it is called to the laravel-microservice-projectB microservice. So you have to setup the laravel-microservice-projectB project first in your machine.

laravel-microservice-projecta's People

Contributors

gihandilanka-github avatar

Watchers

 avatar Sayib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.