mirror of
https://github.com/furyhawk/lta_datamall_api.git
synced 2026-07-20 09:48:00 +00:00
LTA DataMall APISIX Gateway
This project runs Apache APISIX as an API gateway in front of the LTA DataMall FastAPI backend.
What it does
- Proxies
/api/v1/*to the backend service - Forwards backend health and docs endpoints through the gateway
- Exposes Apache APISIX Dashboard for route inspection and editing
- Keeps gateway configuration isolated from the API service project
Prerequisites
- Docker or Podman with compose support
- The backend service running on
http://host.docker.internal:8068on macOS
Docker uses host.docker.internal.
Podman uses host.containers.internal.
This project keeps separate compose wiring for each runtime and the gateway Makefile selects the right file automatically.
If your backend runs on a different host or port, update BACKEND_HOST and BACKEND_PORT in the selected compose file.
Run
- Start the backend service first.
- Start the gateway:
make up
- Open the dashboard:
open http://localhost:9099
Dashboard default login:
- Username:
admin - Password:
admin
- Send requests through APISIX:
curl "http://localhost:9080/api/v1/bus-arrival?BusStopCode=83139&ServiceNo=3&Date=2025-01-01"
Useful Commands
make up
make down
make logs
make ps
make up, make down, make logs, and make ps automatically choose docker-compose.yml for Docker and podman-compose.yml for Podman.
Ports
9080- APISIX proxy listener9180- APISIX Admin API9099- APISIX Dashboard
Notes
- This stack uses APISIX traditional mode with etcd so the dashboard can manage routes.
- The initial upstream and routes are seeded automatically by
scripts/bootstrap-routes.shwhen the stack starts. conf/apisix.yamlandconf/apisix.podman.yamlare kept only as standalone-mode references and are not loaded by the dashboard-enabled stack.- Change the default dashboard login and the Admin API key before using this outside local development.