Skip to content

Environment Variable Configuration

Environment variables in Sushi Gateway allow for dynamic configuration of the gateway without modifying files. This method is especially useful in containerized environments, enabling seamless updates and integration with external tools.

Commonly Used Environment Variables

The following table lists the key environment variables supported by Sushi Gateway:

VariableDescriptionRequiredExample ValueDefault Value
CONFIG_FILE_PATHPath to the config.json file for declarative configurations.No/app/config.json/app/config.json
ADMIN_USERUsername for the Admin API.Yesadminadmin
ADMIN_PASSWORDPassword for the Admin API user.Yeschangemechangeme
ADMIN_CORS_ORIGINCORS origin for the Admin API.Nohttp://my.admin.api.domainhttp://localhost:5173
SERVER_CERT_PATHPath to the server certificate for HTTPS. Server certs will be self generated when not provided.No/path/to/cert.crt-
SERVER_KEY_PATHPath to the server private key for HTTPS. Server certs will be self generated when not providedNo/path/to/key.pem-
CA_CERT_PATHPath to the Certificate Authority (CA) file for mutual TLS (mTLS). Required for MTLS plugin related configurations.No/path/to/ca.crt-

Example Configuration

Here’s an example of using environment variables to configure Sushi Gateway in a Docker container:

bash
docker run \
  --rm \
  -e ADMIN_USER=admin \
  -e ADMIN_PASSWORD=securepassword \
  -p 8008:8008 \
  -p 8443:8443 \
  -p 8081:8081 \
  rawsashimi/sushi-proxy:0.4.0

TIP

For a deeper understanding of declarative configurations, visit the Declarative Configuration Guide.

TIP

Ensure sensitive variables are stored securely using secret management tools (e.g., AWS Secrets Manager, HashiCorp Vault).

TIP

For more information on TLS configuration, chewk out the Configuring TLS Guide.

Released under the MIT License.