2.8 KiB
Environment Variables
The Newsroom Web application and Newsroom Worker processes use environment variables to control program execution options.
A TypeScript interface is provided for accessing these values at runtime.
import env from "config/env.ts";
A file named .env
in the project root directory is read at startup to set the values.
Site Configuration
The Control Node offers an ExpressJS-based Web application a test operator uses to control test execution. These variables control the identity of that server and some of its networking details.
DTP_SITE_NAME
The name of the site.
DTP_SITE_NAME_SHORT
The short name of the site.
DTP_SITE_DESCRIPTION
A description of the site.
DTP_SITE_DOMAIN_KEY
The production domain on which the DTP Newsroom Web application will be hosted.
DTP_SITE_HOST
The hostname:port at which the DTP Newsroom Web application is bound.
MongoDB Configuration
DTP_MONGODB_HOST
The hostname of the MongoDB database server (can be localhost).
DTP_MONGODB_DATABASE
The name of the database in which DTP Newsroom data is being managed.
Redis Configuration
DTP_REDIS_HOST
The hostname of the host providing Redis services.
DTP_REDIS_PORT
The TCP port number at which Redis is bound on $DTP_REDIS_HOST
.
DTP_REDIS_PASSWORD
The authentication password to be presented to Redis when connecting.
DTP_REDIS_KEY_PREFIX
A string prefix to be prepended to all keys by the process being managed.
DTP_REDIS_LAZYCONNECT
When set to enabled
, use Redis' lazy connection strategy.
Control Node HTTPS Server
These options control network options for the Control Node ExpressJS Web application.
DTP_HTTPS
When set to enabled
the service will bind and provide the ExpressJS Web application.
DTP_HTTPS_ADDR
The hostname or IP address to which the Web application will bind for service.
DTP_HTTPS_PORT
The TCP port number to which the Web application will bind for service.
DTP_HTTPS_BACKLOG
The TCP connection backlog (0..256) to provide for the Web application.
DTP_HTTPS_KEY_FILE
The private key file to be used when initializing SSL/TLS.
DTP_HTTPS_CRT_FILE
The certificate file to be used when initializing SSL/TLS.
Log Configuration
DTP_LOG_CONSOLE
When set to enabled
, TTY console output will be generated by the process.
DTP_LOG_FILE
When set to enabled
, file output will be generated by the process.
DTP_LOG_FILE_PATH
A string specifying a directory path into which DTP Newsroom process log files will be written (when enabled).
DTP_LOG_DEBUG
When set to enabled
, debug level messages will be written to the log.
DTP_LOG_INFO
When set to enabled
, info-level messages will be written to the log.
DTP_LOG_WARN
When set to enabled
, warn-level messages will be written to the log.