This is a microservice gateway
- Docker
- Docker Compose
-
Build and run the gateway and services:
docker-compose up -d
-
Access the services through the gateway:
-
Express.js service:
curl http://localhost:8000/express
-
-
Access the Kong Admin API:
curl http://localhost:8001
The gateway is configured using the kong.yml file. This file defines the services and routes.
- Services: A service is a backend API that the gateway will proxy requests to.
- Routes: A route defines how requests are sent to a service.
To deploy the gateway to a cloud VM, you can build the Docker image and run it on the VM.
-
Build the Docker image:
docker build -t ioak-gateway . -
Run the Docker image on the VM:
docker run -d --name ioak-gateway -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 ioak-gateway