Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.45 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.45 KB

AI Shop - API Gateway

This service is responsible for orchestrating the calls to the other services. It is a Spring Boot application that uses Spring Cloud Eureka Server for service discovery.

Run locally

To run the API Gateway locally, you need first to build the common module and then start the service. Follow the instructions below in the order they are presented:

  1. Ensure that the Eurka Server is running. If not, start the Eureka Server

  2. Ensure that the Blob Storage Service is running. If not, start the Blob Storage Service

  3. Ensure that the AI Image Processing Service is running. If not, start the AI Image Processing Service

  4. Ensure that the Item Category Service is running. If not, start the Item Category Service

  5. Run the API Gateway

    ./mvnw spring-boot:run

Build the image and push it to Azure Container Registry

  1. Set the following environment variables:

    CONTAINER_REGISTRY_NAME=<your-acr-name>
    TAG=1.1.0
  2. Login to Azure Container Registry

    az acr login --name $CONTAINER_REGISTRY_NAME
  3. Build the image

    docker build -t $CONTAINER_REGISTRY_NAME.azurecr.io/api-gateway:$TAG .
  4. Push the image

    docker push $CONTAINER_REGISTRY_NAME.azurecr.io/api-gateway:$TAG