The example
app uses declarative environment variables powered by
Austenite.
Name | Usage | Description |
---|---|---|
CDN_URL |
Required | CDN to use when serving static assets |
DEBUG |
Optional | Enable or disable debugging features |
EARTH_ATOM_COUNT |
Optional | Number of atoms on earth |
GRPC_TIMEOUT |
Optional | GRPC request timeout |
LOG_LEVEL |
Optional | The minimum log level to record |
PORT |
Optional | Listen port for the HTTP server |
READ_DSN |
Required | Database connection string for read-models |
REDIS_PRIMARY_SERVICE_HOST |
Required | Kubernetes redis-primary service host |
REDIS_PRIMARY_SERVICE_PORT |
Required | Kubernetes redis-primary service port |
SAMPLE_RATIO |
Optional | Ratio of requests to sample |
SESSION_KEY |
Required | Session token signing key |
WEIGHT |
Required | Weighting for this node |
Tip
If you set an empty value for an environment variable, the app behaves as if that variable isn't set.
CDN to use when serving static assets
The CDN_URL
variable is a required variable that takes absolute URL
values, with these constraints:
- Protocol must be
http:
orhttps:
export CDN_URL=http://host.example.org/path/to/resource # URL (http:)
export CDN_URL=https://host.example.org/path/to/resource # URL (https:)
Enable or disable debugging features
The DEBUG
variable is an optional variable that takes true
or false
.
export DEBUG=false # default
export DEBUG=true # true
export DEBUG=false # false
Number of atoms on earth
The EARTH_ATOM_COUNT
variable is an optional variable that takes big
integer values.
export EARTH_ATOM_COUNT=123456 # positive
export EARTH_ATOM_COUNT=-123456 # negative
export EARTH_ATOM_COUNT=0x1e240 # hexadecimal
export EARTH_ATOM_COUNT=0o361100 # octal
export EARTH_ATOM_COUNT=0b11110001001000000 # binary
GRPC request timeout
The GRPC_TIMEOUT
variable is an optional variable that takes ISO 8601
duration values, with these constraints:
- Must be >= PT0.1S and <= PT10S
export GRPC_TIMEOUT=PT0.3S # 300 milliseconds
export GRPC_TIMEOUT=PT5S # 5 seconds
The minimum log level to record
The LOG_LEVEL
variable is an optional variable that takes debug
, info
,
warn
, error
, or fatal
.
export LOG_LEVEL=info # default
export LOG_LEVEL=debug # show information for developers
export LOG_LEVEL=info # standard log messages
export LOG_LEVEL=warn # important, but don't need individual human review
export LOG_LEVEL=error # a healthy application shouldn't produce any errors
export LOG_LEVEL=fatal # the application cannot proceed
Listen port for the HTTP server
The PORT
variable is an optional variable that takes port number
values.
export PORT=8080 # default
export PORT=12345 # a port number
Database connection string for read-models
The READ_DSN
variable is a required variable that takes string values,
with these constraints:
- Must have a minimum length of 30
export READ_DSN='host=localhost dbname=readmodels user=projector' # local database
Kubernetes redis-primary
service host
The REDIS_PRIMARY_SERVICE_HOST
variable is a required variable that takes
hostname values.
export REDIS_PRIMARY_SERVICE_HOST=service.example.org # a hostname
export REDIS_PRIMARY_SERVICE_HOST=10.0.0.11 # an IP address
Kubernetes redis-primary
service port
The REDIS_PRIMARY_SERVICE_PORT
variable is a required variable that takes
port number values.
export REDIS_PRIMARY_SERVICE_PORT=12345 # a port number
Ratio of requests to sample
The SAMPLE_RATIO
variable is an optional variable that takes number
values.
export SAMPLE_RATIO=123456 # integer
export SAMPLE_RATIO=123.456 # positive
export SAMPLE_RATIO=-123.456 # negative
export SAMPLE_RATIO=1.23456e+2 # exponential
export SAMPLE_RATIO=0x1e240 # hexadecimal
export SAMPLE_RATIO=0o361100 # octal
export SAMPLE_RATIO=0b11110001001000000 # binary
Session token signing key
The SESSION_KEY
variable is a required variable that takes base64
values.
export SESSION_KEY=Y29ucXVpc3RhZG9y # base64 encoded string
Weighting for this node
The WEIGHT
variable is a required variable that takes integer values,
with these constraints:
- Must be >= 1
export WEIGHT=1 # lowest
export WEIGHT=100 # high
export WEIGHT=1000 # very high