From 2e8638403008b8934689ba46647caea537baed72 Mon Sep 17 00:00:00 2001 From: f-w Date: Fri, 20 Dec 2024 13:31:58 -0800 Subject: [PATCH 1/2] don't use absolute path --- docs/docs/config/adminIpList.md | 4 ++-- docs/docs/config/cronJobs.md | 14 +++++++------- docs/docs/config/email.md | 14 +++++++------- docs/docs/config/httpHost.md | 2 +- docs/docs/config/internalHttpHost.md | 2 +- docs/docs/config/middleware.md | 8 ++++---- docs/docs/config/notification.md | 10 +++++----- docs/docs/config/oidc.md | 4 ++-- docs/docs/config/overview.md | 8 ++++---- docs/docs/config/reverseProxyIpLists.md | 2 +- docs/docs/config/sms.md | 10 +++++----- docs/docs/config/subscription.md | 8 ++++---- docs/docs/miscellaneous/benchmarks.md | 2 +- docs/docs/miscellaneous/upgrade.md | 12 ++++++------ 14 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/docs/config/adminIpList.md b/docs/docs/config/adminIpList.md index 561a81d32..a33a60420 100644 --- a/docs/docs/config/adminIpList.md +++ b/docs/docs/config/adminIpList.md @@ -4,7 +4,7 @@ permalink: /docs/config-adminIpList/ # Admin IP List -By [design](../overview/#architecture), _NotifyBC_ classifies incoming requests into four types. For a request to be classified as super-admin, the request's source ip must be in admin ip list. By default, the list contains _localhost_ only as defined by _adminIps_ in _/src/config.ts_ +By [design](../overview/#architecture), _NotifyBC_ classifies incoming requests into four types. For a request to be classified as super-admin, the request's source ip must be in admin ip list. By default, the list contains _localhost_ only as defined by _adminIps_ in _src/config.ts_ ```ts module.exports = { @@ -12,7 +12,7 @@ module.exports = { }; ``` -to modify, create config object _adminIps_ with updated list in file _/src/config.local.js_ instead. For example, to add ip range _192.168.0.0/24_ to the list +to modify, create config object _adminIps_ with updated list in file _src/config.local.js_ instead. For example, to add ip range _192.168.0.0/24_ to the list ```js module.exports = { diff --git a/docs/docs/config/cronJobs.md b/docs/docs/config/cronJobs.md index dbbcdd2ef..3cb2d4fb6 100644 --- a/docs/docs/config/cronJobs.md +++ b/docs/docs/config/cronJobs.md @@ -4,7 +4,7 @@ permalink: /docs/config-cronJobs/ # Cron Jobs -_NotifyBC_ runs several cron jobs described below. These jobs are controlled by sub-properties defined in config object _cron_. To change config, create the object and properties in file _/src/config.local.js_. +_NotifyBC_ runs several cron jobs described below. These jobs are controlled by sub-properties defined in config object _cron_. To change config, create the object and properties in file _src/config.local.js_. By default cron jobs are enabled. In a multi-node deployment, cron jobs should only run on the [primary node](../config-nodeRoles/) to ensure single execution. @@ -12,7 +12,7 @@ All cron jobs have a property named _timeSpec_ with the v ## Purge Data -This cron job purges old notifications, subscriptions and notification bounces. The default frequency of cron job and retention policy are defined by _cron.purgeData_ config object in file _/src/config.ts_ +This cron job purges old notifications, subscriptions and notification bounces. The default frequency of cron job and retention policy are defined by _cron.purgeData_ config object in file _src/config.ts_ ```ts module.exports = { @@ -40,7 +40,7 @@ where - expiredAccessTokenRetentionDays: the retention days of expired access tokens - _defaultRetentionDays_: if any of the above retention day config item is omitted, default retention days is used as fall back. -To change a config item, set the config item in file _/src/config.local.js_. For example, to run cron jobs at 2am daily, add following object to _/src/config.local.js_ +To change a config item, set the config item in file _src/config.local.js_. For example, to run cron jobs at 2am daily, add following object to _src/config.local.js_ ```js module.exports = { @@ -54,7 +54,7 @@ module.exports = { ## Dispatch Live Notifications -This cron job sends out future-dated notifications when the notification becomes current. The default config is defined by _cron.dispatchLiveNotifications_ config object in file _/src/config.ts_ +This cron job sends out future-dated notifications when the notification becomes current. The default config is defined by _cron.dispatchLiveNotifications_ config object in file _src/config.ts_ ```ts module.exports = { @@ -69,7 +69,7 @@ module.exports = { ## Check Rss Config Updates -This cron job monitors RSS feed notification dynamic config items. If a config item is created, updated or deleted, the cron job starts, restarts, or stops the RSS-specific cron job. The default config is defined by _cron.checkRssConfigUpdates_ config object in file _/src/config.ts_ +This cron job monitors RSS feed notification dynamic config items. If a config item is created, updated or deleted, the cron job starts, restarts, or stops the RSS-specific cron job. The default config is defined by _cron.checkRssConfigUpdates_ config object in file _src/config.ts_ ```ts module.exports = { @@ -91,7 +91,7 @@ This cron job deletes notification bounces if the latest notification is deemed 1. No bounce received since the latest notification started dispatching, and 2. a configured time span has lapsed since the latest notification finished dispatching -The default config is defined by _cron.deleteBounces_ config object in file _/src/config.ts_ +The default config is defined by _cron.deleteBounces_ config object in file _src/config.ts_ ```ts module.exports = { @@ -113,7 +113,7 @@ where This cron job re-dispatches a broadcast push notifications when redis cluster fails. It is part of [guaranteed broadcast push dispatch processing](../config/notification.md#guaranteed-broadcast-push-dispatch-processing) -The default config is defined by _cron.reDispatchBroadcastPushNotifications_ config object in file _/src/config.ts_ +The default config is defined by _cron.reDispatchBroadcastPushNotifications_ config object in file _src/config.ts_ ```ts module.exports = { diff --git a/docs/docs/config/email.md b/docs/docs/config/email.md index 352a70e31..2e250daaf 100644 --- a/docs/docs/config/email.md +++ b/docs/docs/config/email.md @@ -8,7 +8,7 @@ permalink: /docs/config-email/ By default when no SMTP is specified, _NotifyBC_ uses fake SMTP service [Ethereal](https://ethereal.email/). Ethereal is only good for evaluation purpose as emails sent from _NotifyBC_ are delivered to Ethereal rather than actual recipients. You can access the emails from Ethereal. _NotifyBC_ automatically generates the Ethereal account first time and stores the account information in [configuration](../api/config.md) under name _etherealAccount_ accessible from _NotifyBC_ web console. -For production however, setting up SMTP is **mandatory**. To do so, add following _smtp_ config to _/src/config.local.js_ +For production however, setting up SMTP is **mandatory**. To do so, add following _smtp_ config to _src/config.local.js_ ```js module.exports = { @@ -30,7 +30,7 @@ Check out [Nodemailer](https://nodemailer.com/smtp/) for other config options th ## Throttle -_NotifyBC_ can throttle email requests if SMTP server imposes rate limit. To enable throttle and set rate limit, create following config in file _/src/config.local.js_ +_NotifyBC_ can throttle email requests if SMTP server imposes rate limit. To enable throttle and set rate limit, create following config in file _src/config.local.js_ ```js module.exports = { @@ -66,7 +66,7 @@ open to internet 1. _NotifyBC_, if it can be installed on such internet-facing host directly; otherwise, 2. a tcp proxy server, such as nginx with stream proxy module that can proxy tcp port 25 traffic to backend _NotifyBC_ instances. -Regardless which above option is chosen, you need to config _NotifyBC_ inbound SMTP server by adding following static config _email.inboundSmtpServer_ to file _/src/config.local.js_ +Regardless which above option is chosen, you need to config _NotifyBC_ inbound SMTP server by adding following static config _email.inboundSmtpServer_ to file _src/config.local.js_ ```js module.exports = { @@ -140,9 +140,9 @@ Bounce handling involves four actions To setup bounce handling - set up [inbound smtp server](#inbound-smtp-server) -- verify config _email.bounce.enabled_ is set to true or absent in _/src/config.local.js_ +- verify config _email.bounce.enabled_ is set to true or absent in _src/config.local.js_ - verify and adjust unsubscription threshold and bounce filter criteria if needed. - Following is the default config in file _/src/config.ts_ compatible with [rfc 3464](https://tools.ietf.org/html/rfc3464) + Following is the default config in file _src/config.ts_ compatible with [rfc 3464](https://tools.ietf.org/html/rfc3464) ```ts module.exports = { @@ -188,9 +188,9 @@ To support this unsubscription method, _NotifyBC_ implements a custom inbound SM To enable list-unsubscribe by email - set up [inbound smtp server](#inbound-smtp-server) -- verify config _email.listUnsubscribeByEmail.enabled_ is set to true or absent in _/src/config.local.js_ +- verify config _email.listUnsubscribeByEmail.enabled_ is set to true or absent in _src/config.local.js_ -To disable list-unsubscribe by email, set _email.listUnsubscribeByEmail.enabled_ to _false_ in _/src/config.local.js_ +To disable list-unsubscribe by email, set _email.listUnsubscribeByEmail.enabled_ to _false_ in _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/config/httpHost.md b/docs/docs/config/httpHost.md index a68e0ab01..8ad866dd9 100644 --- a/docs/docs/config/httpHost.md +++ b/docs/docs/config/httpHost.md @@ -16,7 +16,7 @@ _httpHost_ can be overridden by other configs or data. For example There are contexts where there is no alternatives to _httpHost_. Therefore this config should be defined. -Define the config, which has no default value, in _/src/config.local.js_ +Define the config, which has no default value, in _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/config/internalHttpHost.md b/docs/docs/config/internalHttpHost.md index a2b05211e..09b27023f 100644 --- a/docs/docs/config/internalHttpHost.md +++ b/docs/docs/config/internalHttpHost.md @@ -4,7 +4,7 @@ permalink: /docs/config-internalHttpHost/ # Internal HTTP Host -By default, HTTP requests submitted by _NotifyBC_ back to itself will be sent to _httpHost_ if defined or the host of the incoming HTTP request that spawns such internal requests. But if config _internalHttpHost_, which has no default value, is defined, for example in file _/src/config.local.js_ +By default, HTTP requests submitted by _NotifyBC_ back to itself will be sent to _httpHost_ if defined or the host of the incoming HTTP request that spawns such internal requests. But if config _internalHttpHost_, which has no default value, is defined, for example in file _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/config/middleware.md b/docs/docs/config/middleware.md index 3f7349c9c..c30def2c4 100644 --- a/docs/docs/config/middleware.md +++ b/docs/docs/config/middleware.md @@ -4,13 +4,13 @@ permalink: /docs/config-middleware/ # Middleware -_NotifyBC_ pre-installed following [Express](https://expressjs.com/) middleware as defined in _/src/middleware.ts_ +_NotifyBC_ pre-installed following [Express](https://expressjs.com/) middleware as defined in _src/middleware.ts_ - [compression](https://www.npmjs.com/package/compression) - [helmet](https://www.npmjs.com/package/helmet) - [morgan](https://www.npmjs.com/package/morgan) (disabled by default) -_/src/middleware.ts_ contains following default middleware settings +_src/middleware.ts_ contains following default middleware settings ```ts import path from 'path'; @@ -30,7 +30,7 @@ module.exports = { }; ``` -_/src/middleware.ts_ has following structure +_src/middleware.ts_ has following structure ```ts module.exports = { @@ -45,7 +45,7 @@ module.exports = { Middleware defined under _all_ applies to both API and web console requests, as opposed to _apiOnly_, which applies to API requests only. _params_ are passed to middleware function as arguments. _enabled_ toggles the middleware on or off. -To change default settings defined in _/src/middleware.ts_, create file _/src/middleware.local.ts_ or _/src/middleware.\.ts_ to override. For example, to enable access log, +To change default settings defined in _src/middleware.ts_, create file _src/middleware.local.ts_ or _src/middleware.\.ts_ to override. For example, to enable access log, ```ts module.exports = { diff --git a/docs/docs/config/notification.md b/docs/docs/config/notification.md index 841bfdb91..06109bbd8 100644 --- a/docs/docs/config/notification.md +++ b/docs/docs/config/notification.md @@ -61,7 +61,7 @@ The config items in the _value_ field are To achieve horizontal scaling, when a broadcast push notification request is received, _NotifyBC_ divides subscribers into chunks and submits a BullMQ job for each chunk. The chunk size is defined by config _broadcastSubscriberChunkSize_. All subscribers in a chunk are processed concurrently. -The default value for _broadcastSubscriberChunkSize_ is defined in _/src/config.ts_ +The default value for _broadcastSubscriberChunkSize_ is defined in _src/config.ts_ ```ts module.exports = { @@ -71,7 +71,7 @@ module.exports = { }; ``` -To customize, create the config with updated value in file _/src/config.local.js_. +To customize, create the config with updated value in file _src/config.local.js_. ::: tip When to adjust chunk size? @@ -87,7 +87,7 @@ Defining custom function requires knowledge of JavaScript and understanding how ::: -To support rule-based notification event filtering, _NotifyBC_ uses a [modified version](https://github.com/f-w/jmespath.js) of [jmespath](http://jmespath.org/) to implement json query. The modified version allows defining custom functions that can be used in [broadcastPushNotificationFilter](../api-subscription#broadcastPushNotificationFilter) field of subscription API and [broadcastPushNotificationSubscriptionFilter](../api-notification#broadcastPushNotificationSubscriptionFilter) field of subscription API. The functions must be implemented using JavaScript in config _notification.broadcastCustomFilterFunctions_. The functions can even be _async_. For example, the case-insensitive string matching function _contains_ci_ shown in the example of that field can be created in file _/src/config.local.js_ +To support rule-based notification event filtering, _NotifyBC_ uses a [modified version](https://github.com/f-w/jmespath.js) of [jmespath](http://jmespath.org/) to implement json query. The modified version allows defining custom functions that can be used in [broadcastPushNotificationFilter](../api-subscription#broadcastPushNotificationFilter) field of subscription API and [broadcastPushNotificationSubscriptionFilter](../api-notification#broadcastPushNotificationSubscriptionFilter) field of subscription API. The functions must be implemented using JavaScript in config _notification.broadcastCustomFilterFunctions_. The functions can even be _async_. For example, the case-insensitive string matching function _contains_ci_ shown in the example of that field can be created in file _src/config.local.js_ ```js const _ = require('lodash') @@ -158,7 +158,7 @@ without the guarantee. If performance is a higher priority to you, disable both the guarantee and bounce handling by setting config _notification.guaranteedBroadcastPushDispatchProcessing_ and _email.bounce.enabled_ to -_false_ in file _/src/config.local.js_ +_false_ in file _src/config.local.js_ ```js module.exports = { @@ -175,7 +175,7 @@ In such case only failed dispatches are written to _dispatch.failed_ field of th ### Also log skipped dispatches for broadcast push notifications -When _guaranteedBroadcastPushDispatchProcessing_ is _true_, by default only successful and failed dispatches are logged, along with dispatch candidates. Dispatches that are skipped by filters defined at subscription (_broadcastPushNotificationFilter_) or notification (_broadcastPushNotificationSubscriptionFilter_) are not logged for performance reason. If you also want skipped dispatches to be logged to _dispatch.skipped_ field of the notification, set _logSkippedBroadcastPushDispatches_ to _true_ in file _/src/config.local.js_ +When _guaranteedBroadcastPushDispatchProcessing_ is _true_, by default only successful and failed dispatches are logged, along with dispatch candidates. Dispatches that are skipped by filters defined at subscription (_broadcastPushNotificationFilter_) or notification (_broadcastPushNotificationSubscriptionFilter_) are not logged for performance reason. If you also want skipped dispatches to be logged to _dispatch.skipped_ field of the notification, set _logSkippedBroadcastPushDispatches_ to _true_ in file _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/config/oidc.md b/docs/docs/config/oidc.md index 9f8529111..0d8c518f6 100644 --- a/docs/docs/config/oidc.md +++ b/docs/docs/config/oidc.md @@ -6,7 +6,7 @@ permalink: /docs/config-oidc/ _NotifyBC_ currently can only authenticate RSA signed OIDC access token if the token is a JWT. OIDC providers such as Keycloak meet the requirement. -To enable OIDC authentication strategy, add _oidc_ configuration object to _/src/config.local.js_. The object supports following properties +To enable OIDC authentication strategy, add _oidc_ configuration object to _src/config.local.js_. The object supports following properties 1. _discoveryUrl_ - [OIDC discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) url 2. _clientId_ - OIDC client id @@ -36,4 +36,4 @@ module.exports = { In _NotifyBC_ web console and only in the web console, OIDC authentication takes precedence over built-in admin user, meaning if OIDC is configured, the login button goes to OIDC provider rather than the login form. -There is no default OIDC configuration in _/src/config.ts_. +There is no default OIDC configuration in _src/config.ts_. diff --git a/docs/docs/config/overview.md b/docs/docs/config/overview.md index 408d4ac57..d089ecbb6 100644 --- a/docs/docs/config/overview.md +++ b/docs/docs/config/overview.md @@ -14,14 +14,14 @@ There are two types of configurations - static and dynamic. Static configuration ## Static Configurations -Most static configurations are specified in file _/src/config.ts_. If you need to change, instead of updating _/src/config.ts_ file, create local file _/src/config.local.js_ or environment specific file _/src/config.\.js_, which is only included when environment variable _NODE_ENV_ equals _\_. Besides _js_, _ts_ and _json_ file extensions are also supported. The rest of the documentation assumes the file extension is _js_. Content in these files are deeply merged in following ascending precedence +Most static configurations are specified in file _src/config.ts_. If you need to change, instead of updating _src/config.ts_ file, create local file _src/config.local.js_ or environment specific file _src/config.\.js_, which is only included when environment variable _NODE_ENV_ equals _\_. Besides _js_, _ts_ and _json_ file extensions are also supported. The rest of the documentation assumes the file extension is _js_. Content in these files are deeply merged in following ascending precedence - default file /src/config.ts -- environment specific file _/src/config.\.js_ -- local file _/src/config.local.js_ +- environment specific file _src/config.\.js_ +- local file _src/config.local.js_ ::: warning Run build script whenever changing file in /src -Every time a file under _/src_, including config files, is updated, run `npm run build` before restarting _NotifyBC_ to take effect. +Every time a file under _src_, including config files, is updated, run `npm run build` before restarting _NotifyBC_ to take effect. ::: Following configs should be customized per installation diff --git a/docs/docs/config/reverseProxyIpLists.md b/docs/docs/config/reverseProxyIpLists.md index b54ff20d0..e905c9960 100644 --- a/docs/docs/config/reverseProxyIpLists.md +++ b/docs/docs/config/reverseProxyIpLists.md @@ -9,7 +9,7 @@ SiteMinder, being a gateway approached SSO solution, expects the backend HTTP ac - _siteMinderReverseProxyIps_ contains a list of ips or ranges of SiteMinder Web Agents. If set, then the SiteMinder HTTP headers are trusted only if the request is routed from the listed nodes. - _trustedReverseProxyIps_ contains a list of ips or ranges of trusted reverse proxies. If _NotifyBC_ is placed behind SiteMinder Web Agents, then trusted reverse proxies should include only those between SiteMinder Web Agents and _NotifyBC_ application. When running on OpenShift, this is usually the OpenShift router. Express.js [trust proxy](https://expressjs.com/en/guide/behind-proxies.html) is set to this config object. -By default _trustedReverseProxyIps_ is empty and _siteMinderReverseProxyIps_ contains only localhost as defined in _/src/config.ts_ +By default _trustedReverseProxyIps_ is empty and _siteMinderReverseProxyIps_ contains only localhost as defined in _src/config.ts_ ```ts module.exports = { diff --git a/docs/docs/config/sms.md b/docs/docs/config/sms.md index 06771e668..10fa64b8e 100644 --- a/docs/docs/config/sms.md +++ b/docs/docs/config/sms.md @@ -11,7 +11,7 @@ _NotifyBC_ depends on underlying SMS service providers to deliver SMS messages. - [Twilio](https://twilio.com/) (default) - [Swift](https://www.swiftsmsgateway.com) -Only one service provider can be chosen per installation. To change service provider, add following config to file _/src/config.local.js_ +Only one service provider can be chosen per installation. To change service provider, add following config to file _src/config.local.js_ ```ts module.exports = { @@ -27,7 +27,7 @@ Provider specific settings are defined in config _sms.providerSettings_. You sho ### Twilio -Add _sms.providerSettings.twilio_ config object to file _/src/config.local.js_ +Add _sms.providerSettings.twilio_ config object to file _src/config.local.js_ ```js module.exports = { @@ -47,7 +47,7 @@ Obtain _\_, _\_ and _\_ from your Twilio a ### Swift -Add _sms.providerSettings.swift_ config object to file _/src/config.local.js_ +Add _sms.providerSettings.swift_ config object to file _src/config.local.js_ ```js module.exports = { @@ -70,7 +70,7 @@ With Swift short code, sms user can unsubscribe by replying to a sms message wit To enable this feature, 1. Generate a random string, hereafter referred to as _\_ -2. Add it to _sms.providerSettings.swift.notifyBCSwiftKey_ in file _/src/config.local.js_ +2. Add it to _sms.providerSettings.swift.notifyBCSwiftKey_ in file _src/config.local.js_ ```js module.exports = { @@ -97,7 +97,7 @@ To enable this feature, ## Throttle -All supported SMS service providers impose request rate limit. _NotifyBC_ by default throttles request rate to 4/sec. To adjust the rate, create following config in file _/src/config.local.js_ +All supported SMS service providers impose request rate limit. _NotifyBC_ by default throttles request rate to 4/sec. To adjust the rate, create following config in file _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/config/subscription.md b/docs/docs/config/subscription.md index e59b2db72..98be619f8 100644 --- a/docs/docs/config/subscription.md +++ b/docs/docs/config/subscription.md @@ -4,9 +4,9 @@ permalink: /docs/config-subscription/ # Subscription -Configs in this section customize behavior of subscription and unsubscription workflow. They are all sub-properties of config object _subscription_. This object can be defined as service-agnostic static config as well as service-specific dynamic config, which overrides the static one on a service-by-service basis. Default static config is defined in file _/src/config.ts_. There is no default dynamic config. +Configs in this section customize behavior of subscription and unsubscription workflow. They are all sub-properties of config object _subscription_. This object can be defined as service-agnostic static config as well as service-specific dynamic config, which overrides the static one on a service-by-service basis. Default static config is defined in file _src/config.ts_. There is no default dynamic config. -To customize static config, create the config object _subscription_ in file _/src/config.local.js_ +To customize static config, create the config object _subscription_ in file _src/config.local.js_ ```js module.exports = { @@ -182,7 +182,7 @@ module.exports = { }; ``` -The settings control whether or not unsubscription code is required, its RegEx pattern, and acknowledgement message templates for both on-screen and push notifications. Customization should be made to file _/src/config.local.js_ for static config or using configuration api for service-specific dynamic config. +The settings control whether or not unsubscription code is required, its RegEx pattern, and acknowledgement message templates for both on-screen and push notifications. Customization should be made to file _src/config.local.js_ for static config or using configuration api for service-specific dynamic config. To disable acknowledgement notification, set _subscription.anonymousUnsubscription.acknowledgements.notification_ or a specific channel underneath to _null_ @@ -198,7 +198,7 @@ module.exports = { }; ``` -For on-screen acknowledgement, you can define a redirect URL instead of displaying _successMessage_ or _failureMessage_. For example, to redirect on-screen acknowledgement to a page in your app for all services, create following config in file _/src/config.local.js_ +For on-screen acknowledgement, you can define a redirect URL instead of displaying _successMessage_ or _failureMessage_. For example, to redirect on-screen acknowledgement to a page in your app for all services, create following config in file _src/config.local.js_ ```js module.exports = { diff --git a/docs/docs/miscellaneous/benchmarks.md b/docs/docs/miscellaneous/benchmarks.md index 39a5d9dc1..46f501370 100644 --- a/docs/docs/miscellaneous/benchmarks.md +++ b/docs/docs/miscellaneous/benchmarks.md @@ -57,7 +57,7 @@ The test was performed in August 2017. Unless otherwise specified, the versions ## Procedure -1. update or create file _/src/config.local.js_ through [configMap](../installation/#update-configuration-files). Add sections for SMTP server and a custom filter function +1. update or create file _src/config.local.js_ through [configMap](../installation/#update-configuration-files). Add sections for SMTP server and a custom filter function ```js var _ = require('lodash'); diff --git a/docs/docs/miscellaneous/upgrade.md b/docs/docs/miscellaneous/upgrade.md index 7ffb3ad74..38cf31862 100644 --- a/docs/docs/miscellaneous/upgrade.md +++ b/docs/docs/miscellaneous/upgrade.md @@ -71,7 +71,7 @@ v6 introduced following backward incompatible changes 3. Terms for [node roles](../config/nodeRoles.md) have changed. If you defined environment variable _NOTIFYBC_NODE_ROLE_ with value other than _slave_, remove the environment variable; otherwise change it to _secondary_. If you deployed NotifyBC using Helm, this change is taken care of. -4. config `notification.broadcastSubRequestBatchSize` is deprecated. If you defined it in _/src/config.local.js_, remove it. +4. config `notification.broadcastSubRequestBatchSize` is deprecated. If you defined it in _src/config.local.js_, remove it. 5. Bitnami MongoDB Helm chart is updated from version 14.3.2 to 16.3.3, with corresponding MongoDB from 7.0.4 to 8.0.4. If you deployed _NotifyBC_ using Helm, or if you are running MongoDB 7 and planning to upgrade to MongoDB 8, follow [Upgrade 7.0 to 8.0](https://www.mongodb.com/docs/manual/release-notes/8.0-upgrade/). In particular, ensure `setFeatureCompatibilityVersion` is set to `7.0` ``` db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ) @@ -230,9 +230,9 @@ v4 introduced following backward incompatible changes that need to be addressed 1. The precedence of config, middleware and datasource files has been changed. Local file takes higher precedence than environment specific file. For example, for config file, the new precedence in ascending order is - 1. default file _/src/config.ts_ - 2. environment specific file _/src/config.\.js_, where \ is determined by environment variable _NODE_ENV_ - 3. local file _/src/config.local.js_ + 1. default file _src/config.ts_ + 2. environment specific file _src/config.\.js_, where \ is determined by environment variable _NODE_ENV_ + 3. local file _src/config.local.js_ To upgrade, if you have environment specific file, merge its content into the local file, then delete it. @@ -243,7 +243,7 @@ v4 introduced following backward incompatible changes that need to be addressed 6. Config _notification.handleListUnsubscribeByEmail_ is changed to _email.listUnsubscribeByEmail.enabled_. See [List-unsubscribe by Email](../config/email.md#list-unsubscribe-by-email) for example. 7. Config _smsServiceProvider_ is changed to _sms.provider_. See [Provider](../config/sms.md#provider) for example. 8. SMS service provider specific settings defined in config _sms_ are changed to _sms.providerSettings_. See [Provider Settings](../config/sms.md#provider-settings) for example. The config object _sms_ now encapsulates all SMS configs - _provider_, _providerSettings_ and _throttle_. -9. Legacy config _subscription.unsubscriptionEmailDomain_ is removed. If you have it defined in your file _/src/config.local.js_, replace with _email.inboundSmtpServer.domain_. +9. Legacy config _subscription.unsubscriptionEmailDomain_ is removed. If you have it defined in your file _src/config.local.js_, replace with _email.inboundSmtpServer.domain_. 10. Helm chart added Redis that requires authentication by default. Create a new password in _helm/values.local.yaml_ to facilitate upgrading ```yaml @@ -276,7 +276,7 @@ Replace _v4.x.x_ with a v4 release, preferably latest, found in GitHub such as _ v3 introduced following backward incompatible changes 1. Changed output-only fields _failedDispatches_ and _successDispatches_ to _dispatch.failed_ and _dispatch.successful_ respectively in _Notification_ api. If your client app depends on the fields, change accordingly. -2. Changed config _notification.logSuccessfulBroadcastDispatches_ to _notification.guaranteedBroadcastPushDispatchProcessing_ and reversed default value from _false_ to _true_. If you don't want _NotifyBC_ guarantees processing all subscriptions to a broadcast push notification in a node failure resilient way, perhaps for performance reason, set the value to _false_ in file _/src/config.local.js_. +2. Changed config _notification.logSuccessfulBroadcastDispatches_ to _notification.guaranteedBroadcastPushDispatchProcessing_ and reversed default value from _false_ to _true_. If you don't want _NotifyBC_ guarantees processing all subscriptions to a broadcast push notification in a node failure resilient way, perhaps for performance reason, set the value to _false_ in file _src/config.local.js_. After above changes are addressed, upgrading to v3 is as simple as From 7ebb59fff1e07f1f2413610b9e7f7117817b83fe Mon Sep 17 00:00:00 2001 From: f-w Date: Fri, 20 Dec 2024 13:25:50 -0800 Subject: [PATCH 2/2] updated docs --- docs/docs/config/database.md | 2 +- docs/docs/config/overview.md | 2 +- docs/docs/config/queue.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/docs/config/database.md b/docs/docs/config/database.md index 815b27630..865f45571 100644 --- a/docs/docs/config/database.md +++ b/docs/docs/config/database.md @@ -4,7 +4,7 @@ permalink: /docs/config-database/ # Database -By default _NotifyBC_ uses in-memory database backed up by folder _/server/database/_ for local and docker deployment and MongoDB for Kubernetes deployment. To use MongoDB for non-Kubernetes deployment, add file _/src/datasources/db.datasource.(local|\).(json|js|ts)_ with MongoDB connection information such as following: +By default _NotifyBC_ uses [mongodb-memory-server](https://github.com/typegoose/mongodb-memory-server) backed up by folder _server/database/_ for local and docker deployment and a separate MongoDB for Kubernetes deployment. To use a separate MongoDB for non-Kubernetes deployment, add file _src/datasources/db.datasource.(local|\).(json|js|ts)_ with MongoDB connection information such as following: ```js module.exports = { diff --git a/docs/docs/config/overview.md b/docs/docs/config/overview.md index d089ecbb6..8e0d312a2 100644 --- a/docs/docs/config/overview.md +++ b/docs/docs/config/overview.md @@ -41,7 +41,7 @@ Customizing other configs only if needed. ## Dynamic Configurations -Dynamic configs are managed using REST [configuration api](../api-config/). +Dynamic configs are managed using REST [configuration api](../api-config/). At the time of installing _NotifyBC_, no dynamic configs need to be setup. ::: tip Why Dynamic Configs? Dynamic configs are needed in cases such as diff --git a/docs/docs/config/queue.md b/docs/docs/config/queue.md index 619cd1a7f..0b7454d3a 100644 --- a/docs/docs/config/queue.md +++ b/docs/docs/config/queue.md @@ -34,4 +34,5 @@ module.exports = { }; ``` -If you deployed _NotifyBC_ using Helm chart, this config is taken care of. +If you deployed _NotifyBC_ using Helm chart, this config is taken care of. If you deployed _NotifyBC_ using docker, Redis is created inside docker using [Redis In-Memory Server +](https://github.com/mhassan1/redis-memory-server) by default.