API Gateway control-plane - High-performance Rust API Gateway
2.7K
The Control Plane is the administrative API server that manages gateway configuration (routes, upstreams, services, plugins) stored in PostgreSQL.
docker run -d \
--name api-gateway-control-plane \
-p 8080:8080 \
-e APP__DATABASE__URL=postgres://user:pass@host:5432/api_gateway \
roryfig/api-gateway-control-plane:latest
| Tag | Description |
|---|---|
latest | Latest stable release |
vX.Y.Z | Specific version (e.g., v1.0.0) |
vX.Y | Latest patch of minor version |
vX | Latest minor of major version |
Required:
Optional:
| Variable | Description |
|---|---|
APP__DATABASE__URL | PostgreSQL connection string |
| Variable | Default | Description |
|---|---|---|
APP__SERVER__HOST | 0.0.0.0 | Bind address |
APP__SERVER__PORT | 8080 | HTTP port |
| Variable | Default | Description |
|---|---|---|
APP__DATABASE__MAX_CONNECTIONS | 10 | Max pool size |
APP__DATABASE__MIN_CONNECTIONS | 2 | Min pool size |
| Variable | Default | Description |
|---|---|---|
APP__AUTH__JWT_SECRET | - | JWT signing secret |
APP__AUTH__JWT_ENABLED | true | Enable JWT auth |
APP__AUTH__API_KEY_ENABLED | true | Enable API key auth |
| Variable | Default | Description |
|---|---|---|
APP__LOGGING__LEVEL | info | Log level |
APP__LOGGING__FORMAT | json | Output format |
| Variable | Default | Description |
|---|---|---|
APP__REDIS__URL | - | Redis URL |
APP__REDIS__POOL_SIZE | 10 | Pool size |
| Variable | Default | Description |
|---|---|---|
APP__RABBITMQ__URL | - | RabbitMQ URL |
Mount configuration files for complex setups:
# config/default.yaml
server:
host: 0.0.0.0
port: 8080
database:
max_connections: 20
min_connections: 5
logging:
level: info
format: json
auth:
jwt_enabled: true
api_key_enabled: true
rate_limit:
requests_per_window: 1000
window_seconds: 60
distributed: true
redis:
url: redis://redis:6379
rabbitmq:
url: amqp://guest:guest@rabbitmq:5672
docker run -d \
-v $(pwd)/config:/app/config:ro \
-e APP__DATABASE__URL=postgres://user:pass@host:5432/api_gateway \
-e APP__AUTH__JWT_SECRET=your-secret \
-e APP_ENV=production \
roryfig/api-gateway-control-plane:latest
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: api_gateway
control-plane:
image: roryfig/api-gateway-control-plane:latest
ports:
- "8080:8080"
environment:
APP__DATABASE__URL: postgres://postgres:postgres@postgres:5432/api_gateway
APP__AUTH__JWT_SECRET: ${JWT_SECRET}
depends_on:
- postgres
curl http://localhost:8080/health
# List upstreams
curl http://localhost:8080/api/v1/upstreams
# Create route
curl -X POST http://localhost:8080/api/v1/routes \
-H "Content-Type: application/json" \
-d '{"name": "my-route", "path": "/api/*"}'
Content type
Image
Digest
sha256:9569e6932…
Size
52.8 MB
Last updated
8 months ago
docker pull roryfig/api-gateway-control-plane