stamford-syntax-club / course-compose

Course Compose is a course-review website tailored for Stamford students, providing a platform for sharing and discovering insights about various courses
MIT License
2 stars 0 forks source link

feat: Sgate MVP - Stamford Syntax's custom made API Gateway #15

Closed chinathaip closed 11 months ago

chinathaip commented 11 months ago

What have you done?

API Gateway

This is the minimum viable API Gateway that we will use to redirect traffic to corresponding backend services. The gateway is configurable through a YAML file called syntax-config.yaml Example of the configuration can be seen below:

routes:
    - path: /api/courses
      method: GET
      destination:
          service: list_all_courses
          endpoint: https://center-be.stamford.dev/api/resources/resources # temp url
          is_array: true

    - path: /api/courses/:courseCode
      method: GET
      destination:
          service: get_course_info
          endpoint: http://localhost:8002/courses/:courseCode

    - path: /api/courses/:courseCode/reviews
      method: GET
      destination:
          service: get_course_reviews
          endpoint: http://reviews-api:8003/api/courses/:courseCode/reviews
          is_array: true

Fix for CI pipeline

Set a new condition to skip the deploy-ghcr pipeline when turbo determines that there are no affected packages, and thus, no need for rebuilding the docker images