Skip to content

Repositorio, donde se va a gestionar todo el api gateway.

License

Notifications You must be signed in to change notification settings

RIDECI/RIDECI-API-GATEWAY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Gateway — RIDECI

👥 Participating teams:

🏛️ TROYA
🌊 POSEIDON
⚔️ NEMESIS
🧠 ATENEA
💪 KRATOS
🔱 HADES

🧭 Overview

This repository contains the API Gateway configuration for the RIDECI ecosystem. The gateway uses Kong (declarative configuration) and is intended to route requests to the platform microservices (travels, users, communications, authentication, profiles, notifications, etc.). The main Kong configuration file is config/kong.yml and the gateway is run via Docker Compose.

📦 What this repo provides

  • A Docker Compose service that runs Kong in DB-less (declarative) mode using config/kong.yml.
  • A sample .env.example to provide downstream service URLs (the compose file reads environment variables referenced by Kong).

🛠️ Technologies

  • Kong Gateway (DB-less / declarative mode)
  • Docker & Docker Compose
  • decK (optional, for declarative config management) — not required but useful for syncing configs
  • Environment files (.env) for service endpoint configuration

🛠️ DevOps & Infrastructure

Docker Docker Compose Kong decK Kubernetes

🚀 Hosting & CI/CD

Railway GitHub Actions

🧪 Testing

Postman

🗂️ Repository layout

  • config/kong.yml — Kong declarative configuration (services and routes)
  • docker-compose.yml — Docker Compose service definition for Kong
  • .env.example — environment variables template

⚡ Quick run (recommended)

Follow these steps to run the gateway locally and route traffic to the configured upstream services.

  1. ✅ Prerequisites
  • Docker
  • Docker Compose (v2 / docker compose) or compatible
  • Optional: decK (https://docs.konghq.com/deck/) if you want to manage Kong configs programmatically
  1. ✏️ Copy and edit environment variables
cp .env.example .env
# Edit .env and set the service URLs like URL_TRAVELS, URL_USERS, etc.

Make sure the URLs point to reachable services. If you don't have actual services running, you can point them to mocks or public endpoints for testing.

  1. 🐳 Start Kong with Docker Compose
docker compose up -d

This starts Kong with the config folder mounted and KONG_DECLARATIVE_CONFIG set to /config/kong.yml. Kong will load the routes declared in that file.

After the container is up, you can use Postman to test proxied endpoints on port 8000 (for example: http://localhost:8000/travels, http://localhost:8000/users, http://localhost:8000/conversations, http://localhost:8000/auth, http://localhost:8000/profiles, http://localhost:8000/notifications).

⚙️ Configuration notes

  • config/kong.yml contains service definitions and route paths. The upstream URLs in the file are placeholders and may be overridden by environment variables injected into the Kong container via docker-compose.yml.
  • docker-compose.yml uses env_file: .env so make sure .env exists and contains the variables referenced there.

About

Repositorio, donde se va a gestionar todo el api gateway.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •