Configuration
CONFIGURING LEARNING LOCKER
Both the UI/API/Worker and xAPI Service require a .env
file which will contain all the configuration variables required the application to run.
Where applicable, both of these files will need to have the same values (e.g. in order to connect to the same database).
Both repositories contain .env.example templates which can be copied as new .env
files. If the application has been installed using the install script then this step will be performed for you.
LEARNING LOCKER APPLICATION
Variables in bold are required or strongly recommended
Variables in italics are required for debugging or development only
Name | Description | Example | Default |
---|---|---|---|
NODE_ENV | Under what mode is Node running. This should be left as |
| - |
SITE_URL | The host this application is running under, including protocol |
|
|
UI_PORT | The port that the UI is attached to |
| - |
API_PORT | The port that the API is attached to |
| - |
TEST_API_PORT | A port to expose the application on when running tests |
| - |
APP_SECRET | Unique string used for hashing. Recommended length of 256 bits |
| - |
MONGODB_PATH | The full Mongo connection string. This can include multiple hosts for replicas, and extra configuration values passed through query strings. |
|
|
MONGODB_TEST_PATH | A different Mongo URL to use when running tests |
| - |
MONGO_SOCKET_TIMEOUT_MS | How long does the socket stay open when there is no activity |
|
|
MONGO_CONNECTION_POOLSIZE | https://blog.mlab.com/2013/11/deep-dive-into-connection-pooling/ |
|
|
REDIS_HOST | The host of the Redis instance |
|
|
REDIS_PORT | The port of the Redis instance |
|
|
REDIS_DB | The database number of the Redis instance |
| - |
REDIS_PREFIX | A prefix to append to all keys within the Redis database |
| - |
ALLOW_AGGREGATION_DISK_USE | Can Mongo use its disks for aggregating |
|
|
AGGREGATE_API_ALLOWED_COLLECTIONS | Rule to check whether is collection allowed for Aggregate API or not |
|
|
ALLOWED_WORKER_QUEUES | Comma-separated list of base queue names(without usage of |
| (no value) All queues are enabled |
AGGREGATION_CACHE_SECONDS | How many seconds are aggregation results cached |
|
|
AGGREGATION_REFRESH_AT_SECONDS | Refresh aggregations when this close to expiry |
|
|
MAX_TIME_MS |
|
| |
DISABLE_PERSONA_SCORING | Turn off fuzzy scoring on persona matching. This will make persona workers much faster at scale. |
|
|
LOG_MIN_LEVEL | Minimum logging level (error|warning|info|debug|silly) |
|
|
LOG_DIR | Relative dir to store API access logs |
|
|
TEST_LOG_MIN_LEVEL | Logging level for tests |
| - |
COLOR_LOGS | Should logs be output using ANSI color |
| - |
WINSTON_CLOUDWATCH_ENABLED | Should logs be sent to AWS Cloudwatch? |
|
|
WINSTON_CLOUDWATCH_LOG_GROUP_NAME | The Cloudwatch Logs group name |
|
|
WINSTON_CLOUDWATCH_LOG_STREAM_NAME | The Cloudwatch Logs stream name |
| The server’s hostname |
WINSTON_CLOUDWATCH_ACCESS_KEY_ID | AWS Access Key with suitable privileges |
| - |
WINSTON_CLOUDWATCH_SECRET_ACCESS_KEY | AWS Secret Access Key |
| - |
WINSTON_CLOUDWATCH_REGION | The region the logs will be sent to |
| - |
SMTP_HOST | The SMTP mailbox host |
| - |
SMTP_PORT | The SMTP port |
| - |
SMTP_SECURED | Use SSL for SMTP? |
| - |
SMTP_USER | The SMTP username |
| - |
SMTP_PASS | The SMTP password |
| - |
QUEUE_PROVIDER | Which queue provider should be used? Options are When using Redis, queues are held in the Redis database When using SQS, queues are held and managed by the AWS Simple Queue Service |
| - |
QUEUE_NAMESPACE | A queue prefix for SQS |
| - |
AWS_SQS_ACCESS_KEY_ID | An AWS Access Key ID with privileges to read/write to SQS queue jobs |
| - |
AWS_SQS_SECRET_ACCESS_KEY | An AWS Secret Access Key for SQS |
| - |
AWS_SQS_DEFAULT_REGION | The AWS region for SQS |
| - |
GOOGLE_ENABLED | Enable OAuth via Google (Requires setup in the Google Developer Console) |
|
|
GOOGLE_CLIENT_ID | Google OAuth Client ID |
| - |
GOOGLE_CLIENT_SECRET | Google OAuth Client Secret |
| - |
FS_REPO | Define the storage method ( |
| - |
FS_SUBFOLDER | A subfolder for all uploads to live within |
|
|
FS_LOCAL_ENDPOINT | An absolute path to storage |
| Current working directory |
FS_AWS_S3_ACCESS_KEY_ID | If using the Amazon repo, an AWS Access Key with permissions to read and write to the specified S3 bucket |
| - |
FS_AWS_S3_SECRET_ACCESS_KEY | AWS Secret Access Key |
| - |
FS_AWS_S3_REGION | AWS Secret Access Key |
| - |
FS_AWS_S3_BUCKET | The S3 bucket name |
| - |
NEW_RELIC_LICENSE_KEY | A New Relic license key for monitoring the UI and API |
| - |
NEWRELIC_API_NAME | Name for the API in New Relic |
| - |
NEWRELIC_UI_NAME | Name for the UI in New Relic |
| - |
CLAMSCAN_BINARY | Location of Clamscan binary if requiring anti-virus scans on uploaded files (e.g. images) |
| - |
MAX_TRIP_COUNT | Load control counter for Journey outcomes (Enterprise Only) |
| - |
OPTIMIZELY_SDK_KEY | SDK key generated by Optimizely platform when manually adding an LL environment |
| - |
XAPI SERVICE
Please note that some of these variables are slightly different to their Application equivalents. Future updates will bring these inline with each other, with the eventual goal of allowing for a single .env
file.
Variables in bold are required or strongly recommended
Variables in italics are required for debugging or development only
Name | Description | Example | Default |
---|---|---|---|
EXPRESS_PORT | The port that the UI is attached to |
|
|
MODELS_REPO | Development setting to pick database type ( |
|
|
MONGO_URL | The full Mongo connection string. This can include multiple hosts for replicas, and extra configuration values passed through query strings. |
|
|
REDIS_URL | The full URL of the Redis instance including port, database number and authentication if required |
|
|
REDIS_PREFIX | A prefix to append to all keys within the Redis database |
| - |
REDIS_PREFIX | A prefix to append to all keys within the Redis database |
| ‘LEARNINGLOCKER’ |
STORAGE_REPO | Define the storage method ( |
| - |
FS_LOCAL_STORAGE_DIR | An absolute path to storage |
| Current working directory |
FS_S3_ACCESS_KEY_ID | If using the Amazon repo, an AWS Access Key with permissions to read and write to the specified S3 bucket |
| - |
FS_S3_SECRET_ACCESS_KEY | AWS Secret Access Key |
| - |
FS_S3_REGION | AWS Secret Access Key |
| - |
WINSTON_CONSOLE_LEVEL | Minimum logging level (error|warning|info|debug|silly) |
|
|
WINSTON_CLOUDWATCH_ENABLED | Should logs be sent to AWS Cloudwatch? |
|
|
WINSTON_CLOUDWATCH_LOG_GROUP_NAME | The Cloudwatch Logs group name |
|
|
WINSTON_CLOUDWATCH_LOG_STREAM_NAME | The Cloudwatch Logs stream name |
| The server’s hostname |
WINSTON_CLOUDWATCH_ACCESS_KEY_ID | AWS Access Key with suitable privileges |
| - |
WINSTON_CLOUDWATCH_SECRET_ACCESS_KEY | AWS Secret Access Key |
| - |
WINSTON_CLOUDWATCH_REGION | The region the logs will be sent to |
| - |
Learning Locker and the Squirrel logo are trademark of Learning Pool 2020 | Learning Locker is licensed under GPL 3.0.