########################################################### ### STANDARD ENV VARIABLES ################################ ########################################################### # This should always be set to "production". # See https://www.youtube.com/watch?v=HMM7GJC5E2o NODE_ENV="production" # NOTE: Needs to be set to "0.0.0.0" if using Docker. # Ignored if deployed with included Docker Compose file. # Defaults to resolving to "localhost" if not set HOST= # Expects number. # Defaults to using port 3000 if not set PORT= ### CORS ################################################## # Set "Access-Control-Allow-Origin" response header. # Origin can be comma-delimited string, string, or boolean; # if set to boolean true then reflect request origin # (NOTE: this is NOT recommended for production as it enables reflection exploits). # Defaults to false and disables CORS if not set CORS_ORIGIN= # Set "Access-Control-Allow-Headers" response header. # Expects comma-delimited string i.e. "Content-Type, Authorization". # Defaults to reflecting the headers specified in the # request's "Access-Control-Request-Headers" header CORS_ALLOWED_HEADERS= # Set "Access-Control-Allow-Credentials" response header. # Expects true or to be unset CORS_ALLOW_CREDENTIALS= # Set "Access-Control-Expose-Headers" response header. # Expects comma-delimited string i.e. "Content-Range, X-Content-Range" or to be unset CORS_EXPOSED_HEADERS= # Set "Access-Control-Max-Age" response header. # Expects integer or to be unset CORS_MAX_AGE= ### DOCKER ################################################ # The max amount of processing time the Docker container # can use of CPU. # As an example, setting to 0.98 represents 98% of CPU # processing time of a single core. # Defaults to 0 (use all available processing time) DOCKER_APP_CPUS= # The max amount of memory the Docker container can use. # As an example, "50M". # Defaults to 0 (use all available memory) DOCKER_APP_MEMORY= # Refer to https://docs.docker.com/reference/compose-file/services/#restart # for options. # Defaults to "unless-stopped" DOCKER_RESTART_POLICY= ### HTTPS ################################################# # Will use PFX file/passphrase over SSL cert/key if both specified. # Defaults to serving over HTTP if not set HTTPS_PFX_PASSPHRASE= HTTPS_PFX_FILE_PATH= HTTPS_SSL_CERT_PATH= HTTPS_SSL_KEY_PATH= # Enable HTTP/2 support with HTTP/1.x fallback. # Requires cert/key supporting TLS 1.2 or above. # Expects true or to be unset HTTPS_HTTP2_ENABLED= ### LOGGER ################################################ # Level can be "trace", "debug", "info", "warn", "error", or "fatal". # Defaults to "info" LOG_LEVEL= # See https://github.com/rogerc/file-stream-rotator#options for # date format options. # Requires LOG_ROTATION_FILENAME to be set. # Defaults to "YYYY-MM-DD" LOG_ROTATION_DATE_FORMAT= # Filename including full path used by the stream, example: # "./logs/docsmith-%DATE%.log" # Defaults to STDOUT. # Ignored if deployed with included Docker Compose file, # as Docker's daemon handles logging and rotations LOG_ROTATION_FILENAME= # Frequency can be "daily", "date", "[1-12]h" or "[1-30]m". # Defaults to "daily". # Set to "date" to rotate based on LOG_ROTATION_DATE_FORMAT. # Requires LOG_ROTATION_FILENAME to be set. # Ignored if deployed with included Docker Compose file. # Defaults to "daily" LOG_ROTATION_FREQUENCY= # Max number of logs to keep. If not set, it will not remove past logs. # Requires LOG_ROTATION_FILENAME to be set. # If using days, add "d" as the suffix. # Defaults to "10" if deployed with included Docker Compose file LOG_ROTATION_MAX_LOGS= # Max size of the file after which it will rotate. # It can be combined with frequency or date format. # The size units are "k", "m" and "g". # Units need to directly follow a number e.g. 1g, 100m, 20k. # Requires LOG_ROTATION_FILENAME to be set. # Defaults to "100m" if deployed with included Docker Compose file LOG_ROTATION_MAX_SIZE= ### PROCESS LOAD HANDLING ################################# # If one of the below thresholds is reached then the server # will return a 503 response until the load has been relieved # The max event loop delay in milliseconds. # Defaults to 0 (disabled) PROC_LOAD_MAX_EVENT_LOOP_DELAY= # The max Event Loop Utilization (ELU). # As an example, setting to 0.98 represents 98%. # Defaults to 0 (disabled) PROC_LOAD_MAX_EVENT_LOOP_UTILIZATION= # The max heap size in bytes. # Defaults to 0 (disabled) PROC_LOAD_MAX_HEAP_USED_BYTES= # The max Resident Set Size (RSS) in bytes. # Defaults to 0 (disabled) PROC_LOAD_MAX_RSS_BYTES= ### RATE LIMITING ######################################### # List of IPs that are excluded from rate limiting RATE_LIMIT_EXCLUDED_ARRAY= # Maximum number of connections per minute per client. # Defaults to 1000 RATE_LIMIT_MAX_CONNECTIONS_PER_MIN= ########################################################### ### PROJECT SPECIFIC ENV VARIABLES ######################## ########################################################### # The maximum payload, in bytes, the server is allowed to accept. # Defaults to 10485760 (10MB) if not set REQ_BODY_MAX_BYTES= ### API KEYS ############################################## # Example: [{"service": "test", "value": "testtoken"}] # "value" is the only mandatory value in each object in array. # Leaving empty will disable bearer token auth AUTH_BEARER_TOKEN_ARRAY= ### OCR ################################################### # Expects true or false. # Please note that OCR functionality is CPU intensive, ensure that hardware is suitable. # Defaults to false if unset OCR_ENABLED= # The number of Tesseract workers to create. # Defaults to counting the number of physical cores on the machine # and creating an equal number of workers OCR_WORKERS= # Languages to load trained data for for the `ocr` query string param # supported by the pdf/txt route. # Multiple languages should be concatenated with a "+" i.e. "eng+chi_tra" # for English and Chinese Traditional languages. # Remember to place trained data in "./ocr_lang_data" as well! # Defaults to "eng" English OCR_LANGUAGES=