diff --git a/packages/api/README.md b/packages/api/README.md index 8a8121a4..b7361fe2 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -33,7 +33,9 @@ The API is configured via combination of [environment variables](#environment-va ### Environment variables Parts of the API needs to be initialized prior the configuration files are loaded. This is done via environment -variables. For example: +variables. All of the environment variables are optional and or set with default values for convenience. + +Example: ```sh # Defines a logger suitable for production. @@ -53,7 +55,7 @@ AWS_S3_BUCKET_PATH=configs/my-app/signed-api.json -#### `LOGGER_ENABLED` +#### `LOGGER_ENABLED` _(optional)_ Enables or disables logging. Options: @@ -62,7 +64,7 @@ Enables or disables logging. Options: Default: `true`. -#### `LOG_FORMAT` +#### `LOG_FORMAT` _(optional)_ The format of the log output. Options: @@ -72,7 +74,7 @@ The format of the log output. Options: Default: `json`. -#### `LOG_COLORIZE` +#### `LOG_COLORIZE` _(optional)_ Enables or disables colors in the log output. Options: @@ -82,7 +84,7 @@ Enables or disables colors in the log output. Options: Default: `false`. -#### `LOG_LEVEL` +#### `LOG_LEVEL` _(optional)_ Defines the minimum level of logs. Logs with smaller level (severity) will be silenced. Options: @@ -93,6 +95,35 @@ Defines the minimum level of logs. Logs with smaller level (severity) will be si Default: `info`. +#### `CONFIG_SOURCE` _(optional)_ + +Defines the source of the configuration file. Options: + +- `aws-s3` - The configuration file is downloaded from AWS S3. +- `local` - The configuration file is loaded from the local file system. + +Default: `local`. + +#### `AWS_ACCESS_KEY_ID` _(optional)_ + +The AWS access key ID. Required when `CONFIG_SOURCE` is set to `aws-s3`. + +#### `AWS_SECRET_ACCESS_KEY` _(optional)_ + +The AWS secret access key. Required when `CONFIG_SOURCE` is set to `aws-s3`. + +#### `AWS_REGION` _(optional)_ + +The AWS region. Required when `CONFIG_SOURCE` is set to `aws-s3`. + +#### `AWS_S3_BUCKET_NAME` _(optional)_ + +The name of the AWS S3 bucket. Required when `CONFIG_SOURCE` is set to `aws-s3`. + +#### `AWS_S3_BUCKET_PATH` _(optional)_ + +The path to the configuration file in the AWS S3 bucket. Required when `CONFIG_SOURCE` is set to `aws-s3`. + ### Configuration file The API is configured via `signed-api.json` configuration file. @@ -135,7 +166,7 @@ The delay in seconds for the endpoint. The endpoint will only serve data that is The maximum number of signed data entries that can be inserted in one batch. This is a safety measure to prevent spamming theAPI with large payloads. The batch is rejected if it contains more entries than this value. -#### `cache` +#### `cache` _(optional)_ Configures the cache for the API endpoints. diff --git a/packages/pusher/README.md b/packages/pusher/README.md index 1e42feba..4b7e39d3 100644 --- a/packages/pusher/README.md +++ b/packages/pusher/README.md @@ -54,8 +54,10 @@ Pusher can be configured via a combination of [environment variables](#environme ### Environment variables -Logging needs to be initialized prior the configuration files are loaded. This is done via environment variables. For -example: +Logging needs to be initialized prior the configuration files are loaded. This is done via environment variables. All of +the environment variables are optional and or set with default values for convenience. + +Example: ```sh # Defines a logger suitable for production. @@ -77,7 +79,7 @@ LOG_LEVEL=info -#### `LOGGER_ENABLED` +#### `LOGGER_ENABLED` _(optional)_ Enables or disables logging. Options: @@ -86,7 +88,7 @@ Enables or disables logging. Options: Default: `true`. -#### `LOG_FORMAT` +#### `LOG_FORMAT` _(optional)_ The format of the log output. Options: @@ -96,7 +98,7 @@ The format of the log output. Options: Default: `json`. -#### `LOG_COLORIZE` +#### `LOG_COLORIZE` _(optional)_ Enables or disables colors in the log output. Options: @@ -106,7 +108,7 @@ Enables or disables colors in the log output. Options: Default: `false`. -#### `LOG_LEVEL` +#### `LOG_LEVEL` _(optional)_ Defines the minimum level of logs. Logs with smaller level (severity) will be silenced. Options: