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.
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:
-
Ensure that the Eurka Server is running. If not, start the Eureka Server
-
Ensure that the Blob Storage Service is running. If not, start the Blob Storage Service
-
Ensure that the AI Image Processing Service is running. If not, start the AI Image Processing Service
-
Ensure that the Item Category Service is running. If not, start the Item Category Service
-
Run the API Gateway
./mvnw spring-boot:run
-
Set the following environment variables:
CONTAINER_REGISTRY_NAME=<your-acr-name> TAG=1.1.0
-
Login to Azure Container Registry
az acr login --name $CONTAINER_REGISTRY_NAME
-
Build the image
docker build -t $CONTAINER_REGISTRY_NAME.azurecr.io/api-gateway:$TAG .
-
Push the image
docker push $CONTAINER_REGISTRY_NAME.azurecr.io/api-gateway:$TAG