You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting APP_ENV=development or APP_ENV=staging will override some defaults. If APP_ENV is unset,
default production configuration is used.
These defaults can be modified as you wish or overridden with environment variables.
Sensitive configuration has to be set with environment variables.
Minimal set of environment variables
Name
Description
DB_URI
URI to the postgres database
REDIS_OTP_URI
URI to the redis cache for storing one time passwords
REDIS_SESSION_URI
URI to the redis cache for storing login sessions
REDIS_RATE_LIMIT_URI
URI to the redis cache for rate limiting transactional requests
REDIS_CREDENTIAL_URI
URI to the redis cache for storing credentials
SESSION_SECRET
Secret used to sign the session ID cookie
JWT_SECRET
Secret used to sign pre-signed urls for uploading CSV files to AWS S3
SECRET_MANAGER_SALT
Secret used to generate names of credentials to be stored in AWS Secrets Manager
API_KEY_SALT_V1
Secret used to hash API Keys before storing them in the database
DD_ENV
Environment tag for datadog traces
DD_SERVICE
Service name tag for datadog traces (suggest: postman)
DD_LOGS_INJECTION
Flag determining whether to inject trace_id to our logs (suggest: true)
Full set of environment variables that can be set
General
Name
Description
APP_ENV
Set to production or staging for deployment
APP_NAME
Name of the app
DOMAIN_WHITELIST
Semi-colon separated list of domains that can sign in to the app. Example: .gov.sg;@xyz.abc.sg will allow any emails ending in @<agency>.gov.sg and @xyz.abc.sg to sign in
FRONTEND_URL
CORS: accept requests from this origin. Can be a string, or regex
MAX_RATE_PER_JOB
Number of messages that one worker can send at a time
CSV_PROCESSING_TIMEOUT_IN_MS
Maximum permissible time for csv processing before it is marked as timed out (defaults to 10 mins)
Database
Name
Description
DB_URI
URI to the postgres database
SEQUELIZE_POOL_MAX_CONNECTIONS
Maximum number of connection in pool
SEQUELIZE_POOL_MIN_CONNECTIONS
Minimum number of connection in pool
SEQUELIZE_POOL_ACQUIRE_IN_MILLISECONDS
The maximum time, in milliseconds, that pool will try to get connection before throwing error
URI to the redis cache for storing one time passwords
REDIS_SESSION_URI
URI to the redis cache for storing login sessions
REDIS_RATE_LIMIT_URI
URI to the redis cache for rate limiting requests
AWS Settings
Name
Description
AWS_REGION
Region for the S3 bucket that is used to store file uploads
FILE_STORAGE_BUCKET_NAME
Name of the S3 bucket that is used to store file uploads
JWT_SECRET
Secret used to sign pre-signed urls for uploading CSV files to AWS S3
SECRET_MANAGER_SALT
Secret used to generate names of credentials to be stored in AWS Secrets Manager
AWS_LOG_GROUP_NAME
Name of Cloudwatch log group to write application logs to
For testing locally, you may need to configure your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be able to call AWS APIs. In production, your server should be granted the IAM role with permissions to access resources directly.
Login sessions
Name
Description
SESSION_SECRET
Secret used to sign the session ID cookie
COOKIE_NAME
Identifier for the cookie
COOKIE_DOMAIN
Specifies the value for the Domain Set-Cookie attribute
COOKIE_HTTP_ONLY
Specifies the boolean value for the HttpOnly Set-Cookie attribute.
COOKIE_SECURE
true will set a secure cookie that is sent only over HTTPS.
COOKIE_MAX_AGE
Specifies the number (in milliseconds) to use when calculating the Expires Set-Cookie attribute
COOKIE_SAME_SITE
true will set the SameSite attribute to Strict for strict same site enforcement.
Switch to true to use SNS fallback for all SMS campaigns
SMS_FALLBACK_SENDER_ID
Sender ID to use for all SNS SMS
This set of twilio credentials is used for testing locally only (ie, APP_ENV=development). When in production, users will have to upload their credentials, which will be stored and retrieved from Secrets Manager.
If not set, smses cannot be sent.