API gateway: routing, auth, rate limiting, header rules and Prometheus metrics. (Beta)
670
A self-hosted API gateway that sits in front of your backend services. For every request it decides which service receives it, who the caller is, whether they exceeded a usage limit, and which headers are forwarded. Everything is driven by a single YAML file.
Beta. Under heavy development. Backwards compatibility is not guaranteed yet and a stable release is planned in a few months. Supported platforms: Linux and macOS (images:
linux/amd64,linux/arm64).
Host/metrics, health probesgateway.yaml):ApiVersion: "v1Beta"
Rules:
UsageControlRules:
ten-per-minute:
RequestCount: 10
WindowTime: 1m
ServerConfigs:
my-service:
URL: "http://host.docker.internal:9090"
UsageControlRules:
- ten-per-minute
ServerRoutes:
v1-api:
TargetServer: "my-service"
PathPattern: "/v1/api"
docker run --rm -v $(pwd):/etc/nocleye-beta/gateway:ro \
nocleye/api-gateway check --gConfigPath gateway.yaml
docker run -d --name gateway -p 8080:8080 \
-v $(pwd):/etc/nocleye-beta/gateway:ro \
nocleye/api-gateway gateway --gConfigPath gateway.yaml --gPort 8080
| Port | Purpose |
|---|---|
| 8080 | Gateway traffic |
| 8081 | Support server (health, /metrics, live config). Binds to the container loopback by default, so it is not reachable from outside. For Kubernetes probes or a Prometheus scraper, set SUPPORT_HOST=0.0.0.0 and SUPPORT_TOKEN, and keep the port on private networks only |
/etc/nocleye-beta/gateway/ (put auths/ and certs/ inside it). A read-only mount is enough, the gateway never writes files.gateway; the entrypoint is nocleye, so other commands (check, ...) are passed as arguments.65532:65532), distroless static base, no shell./licenses.docker run nocleye/api-gateway@sha256:...<version> (e.g. v0.2.0-beta): pinned release (recommended)latest: newest releaseBuilt by Nocleye. Website: https://nocleye.comโ ยท Contact: [email protected]โ
Proprietary (see /licenses in the image for third-party notices).
Content type
Image
Digest
sha256:a46406f7aโฆ
Size
5.4 MB
Last updated
1 day ago
docker pull nocleye/api-gateway