Gateway Flags
The gateway is configured via command-line flags or environment variables. Flags take precedence over env vars.
Command-line flags
Section titled “Command-line flags”rep-gateway [flags]| Flag | Default | Description |
|---|---|---|
--mode | proxy | Operating mode: proxy or embedded |
--upstream | localhost:80 | Upstream server address (proxy mode only) |
--port | 8080 | Listen port |
--static-dir | /usr/share/nginx/html | Static file directory (embedded mode only) |
--manifest | — | Path to .rep.yaml manifest file |
--env-file | — | Path to .env file (env vars take precedence) |
--strict | false | Exit on guardrail warnings |
--hot-reload | false | Enable hot reload SSE endpoint |
--hot-reload-mode | signal | Detection mode: file_watch, signal, poll |
--watch-path | — | Path to watch for changes (file_watch mode) |
--poll-interval | 30s | Config poll interval (poll mode) |
--log-format | json | Log format: json or text |
--log-level | info | Log level: debug, info, warn, error |
--allowed-origins | — | Comma-separated CORS origins for /rep/session-key |
--tls-cert | — | Path to TLS certificate |
--tls-key | — | Path to TLS private key |
--health-port | — | Separate port for health check endpoint |
Environment variables
Section titled “Environment variables”Every flag can be set via environment variable with the REP_GATEWAY_ prefix:
REP_GATEWAY_MODE=proxyREP_GATEWAY_UPSTREAM=localhost:80REP_GATEWAY_PORT=8080REP_GATEWAY_STRICT=trueREP_GATEWAY_HOT_RELOAD=trueREP_GATEWAY_HOT_RELOAD_MODE=signalREP_GATEWAY_LOG_FORMAT=jsonREP_GATEWAY_LOG_LEVEL=infoREP_GATEWAY_ALLOWED_ORIGINS=https://app.example.com,https://staging.example.comPrecedence order
Section titled “Precedence order”- Command-line flags (highest)
- Environment variables (
REP_GATEWAY_*) - Manifest file settings (lowest)
Common configurations
Section titled “Common configurations”Proxy mode (development)
Section titled “Proxy mode (development)”rep-gateway \ --mode proxy \ --upstream localhost:5173 \ --port 8080 \ --hot-reloadEmbedded mode (production)
Section titled “Embedded mode (production)”rep-gateway \ --mode embedded \ --static-dir /static \ --port 8080 \ --strict \ --log-format json \ --allowed-origins https://app.example.comKubernetes sidecar
Section titled “Kubernetes sidecar”rep-gateway \ --mode proxy \ --upstream localhost:80 \ --port 8080 \ --strict \ --hot-reload \ --hot-reload-mode file_watch \ --watch-path /config \ --health-port 9090