From d69643ad035445088e41d440a0500bb19e3a23da Mon Sep 17 00:00:00 2001 From: rittou Date: Fri, 9 Jan 2026 16:29:28 +0700 Subject: [PATCH 1/5] feat: add missing redis installation step --- .../best-practices/app-deployment/aws.md | 27 ++++++++++ .../app-deployment/cloudflare.md | 36 ++++++++++++++ .../hosted-with-ubuntu-server.md | 49 +++++++++++++++++++ 3 files changed, 112 insertions(+) diff --git a/products/sales-agent/best-practices/app-deployment/aws.md b/products/sales-agent/best-practices/app-deployment/aws.md index 9c60f55aa..2db9f97e0 100644 --- a/products/sales-agent/best-practices/app-deployment/aws.md +++ b/products/sales-agent/best-practices/app-deployment/aws.md @@ -13,6 +13,33 @@ In this chapter, you will learn how to deploy the frontend source code to [AWS A - Register an AWS account. - Clone the frontend source code and push it to your Git repository (for example, GitHub). +## Setup Redis with Amazon ElastiCache + +AWS Amplify does not include Redis by default. To use Redis for caching, you need to set up [Amazon ElastiCache](https://aws.amazon.com/elasticache/) or use an external Redis provider. + +### Option 1: Amazon ElastiCache + +Amazon ElastiCache is a fully managed in-memory data store service compatible with Redis. + +1. Navigate to the [ElastiCache Console](https://console.aws.amazon.com/elasticache/). +2. Click "Create" and select "Redis OSS" as the cluster engine. +3. Configure your cluster settings (node type, number of replicas, etc.). +4. Configure security groups to allow access from your Amplify application. +5. Once created, note the **Primary Endpoint** for your Redis connection. + +::: warning +ElastiCache runs within a VPC. Connecting from AWS Amplify (which runs outside VPC by default) requires additional configuration such as VPC peering or using a public endpoint. For serverless applications, consider using Option 2. +::: + +### Option 2: Serverless Redis providers + +For easier integration with serverless deployments like AWS Amplify, consider using: + +- [Upstash](https://upstash.com/) - Serverless Redis with REST API support, ideal for edge/serverless environments. +- [Redis Cloud](https://redis.com/cloud/overview/) - Managed Redis with public endpoints. + +These providers offer public endpoints that work seamlessly with AWS Amplify without VPC configuration. + ## Deploy - Login to the AWS Amplify Hosting Console. diff --git a/products/sales-agent/best-practices/app-deployment/cloudflare.md b/products/sales-agent/best-practices/app-deployment/cloudflare.md index 085a111d0..bea0d8fc0 100644 --- a/products/sales-agent/best-practices/app-deployment/cloudflare.md +++ b/products/sales-agent/best-practices/app-deployment/cloudflare.md @@ -13,6 +13,42 @@ In this chapter you will learn how to deploy the frontend source code to [Cloudf - Register a Cloudflare account. - Clone the frontend source code and push to your GitHub repository. +## Setup Redis with Upstash + +Cloudflare Pages/Workers do not include a built-in Redis service. [Upstash](https://upstash.com/) is the recommended serverless Redis provider that integrates natively with Cloudflare. + +### Create an Upstash Redis database + +1. Sign up at [Upstash Console](https://console.upstash.com/). +2. Click "Create Database" and select a region close to your users. +3. Once created, navigate to the database details page. +4. Copy the connection details: + - **REDIS_HOST**: The endpoint URL (e.g., `xxx.upstash.io`) + - **REDIS_PORT**: Usually `6379` or the TLS port `6380` + - **REDIS_PASSWORD**: The password from the database details + - **REDIS_TLS**: Set to `true` for secure connections + +### Configure environment variables + +Add these Redis environment variables to your `.env` file: + +```bash +REDIS_CACHE=true +REDIS_HOST=your-database.upstash.io +REDIS_PORT=6379 +REDIS_PASSWORD=your_upstash_password +REDIS_TLS=true +``` + +### Cloudflare integration (optional) + +You can also set up the Upstash integration directly in Cloudflare: + +1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com/) → Workers & Pages → Your project. +2. Navigate to Settings → Integrations. +3. Find and add the Upstash integration. +4. Follow the prompts to connect your Upstash account. + ## Deploy from a local machine - Due to this [issue](https://github.com/nuxt/nuxt/issues/28248), just make sure your `.npmrc` file has the following content: diff --git a/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md b/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md index dcf29d35f..ced8f5b8d 100644 --- a/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md +++ b/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md @@ -26,6 +26,55 @@ npm install -g pnpm - **Frontend Application**: Clone the frontend source code and push to your GitHub repository. +## Setup Redis + +Redis is required for caching. You can either install Redis locally on your Ubuntu server or use a managed Redis service. + +### Option 1: Install Redis locally + +Install Redis using the package manager: + +```bash +sudo apt update +sudo apt install redis-server +``` + +Configure Redis for production by editing the configuration file: + +```bash +sudo nano /etc/redis/redis.conf +``` + +Key settings to consider: + +- Set `supervised systemd` to integrate with systemd. +- Configure `bind` to restrict access (e.g., `bind 127.0.0.1` for local only). +- Set a password with `requirepass your_secure_password`. + +Enable and start the Redis service: + +```bash +sudo systemctl enable redis +sudo systemctl start redis +``` + +Verify Redis is running: + +```bash +redis-cli ping +``` + +You should see `PONG` as a response. + +### Option 2: Use a managed Redis service + +Alternatively, you can use managed Redis services such as: + +- [Upstash](https://upstash.com/) - Serverless Redis with pay-per-request pricing. +- [Redis Cloud](https://redis.com/cloud/overview/) - Managed Redis by Redis Ltd. + +These services provide connection details (host, port, password) that you configure in your `.env` file. + ## Build code - Please follow instructions here to [set up all necessary things and build the code](../../installation.md#setup-app-server) From 511ab2c0ada5538e979097524af6a93502ed0089 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:17:58 +0000 Subject: [PATCH 2/5] Initial plan From 6d0d1cdae0fe49aedb93c8b8d53a0765971394be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:20:53 +0000 Subject: [PATCH 3/5] Address review comments: fix redis service name, add auth to ping, add env var examples Co-authored-by: rittou <85224631+rittou@users.noreply.github.com> --- .../best-practices/app-deployment/aws.md | 14 ++++++++++++ .../hosted-with-ubuntu-server.md | 22 +++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/products/sales-agent/best-practices/app-deployment/aws.md b/products/sales-agent/best-practices/app-deployment/aws.md index 2db9f97e0..6d30bc9cb 100644 --- a/products/sales-agent/best-practices/app-deployment/aws.md +++ b/products/sales-agent/best-practices/app-deployment/aws.md @@ -40,6 +40,20 @@ For easier integration with serverless deployments like AWS Amplify, consider us These providers offer public endpoints that work seamlessly with AWS Amplify without VPC configuration. +### Configure Redis environment variables + +After setting up Redis (ElastiCache or a serverless provider), configure these environment variables in AWS Amplify: + +```bash +REDIS_CACHE=true +REDIS_HOST=your-redis-endpoint.cache.amazonaws.com # Or your provider's endpoint +REDIS_PORT=6379 +REDIS_PASSWORD=your_redis_password +REDIS_TLS=true # Recommended for production +``` + +Add these variables in the AWS Amplify Console under "Environment variables" in your app settings, or include them in your `.env.template` file. + ## Deploy - Login to the AWS Amplify Hosting Console. diff --git a/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md b/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md index ced8f5b8d..d422594c0 100644 --- a/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md +++ b/products/sales-agent/best-practices/app-deployment/hosted-with-ubuntu-server.md @@ -54,13 +54,17 @@ Key settings to consider: Enable and start the Redis service: ```bash -sudo systemctl enable redis -sudo systemctl start redis +sudo systemctl enable redis-server +sudo systemctl start redis-server ``` Verify Redis is running: ```bash +# If you configured a password with requirepass +redis-cli -a your_secure_password ping + +# If no password is set redis-cli ping ``` @@ -75,6 +79,20 @@ Alternatively, you can use managed Redis services such as: These services provide connection details (host, port, password) that you configure in your `.env` file. +### Configure Redis environment variables + +Add these Redis environment variables to your `.env` file: + +```bash +REDIS_CACHE=true +REDIS_HOST=127.0.0.1 # For local installation, or your managed service endpoint +REDIS_PORT=6379 +REDIS_PASSWORD=your_secure_password # If configured with requirepass +REDIS_TLS=false # Set to true for managed services that require TLS +``` + +For managed Redis services like Upstash, use the connection details provided by the service (host, port, password, and set `REDIS_TLS=true` for secure connections). + ## Build code - Please follow instructions here to [set up all necessary things and build the code](../../installation.md#setup-app-server) From 61c398457ead314b2654000317d60f820393b031 Mon Sep 17 00:00:00 2001 From: rittou Date: Fri, 9 Jan 2026 20:22:31 +0700 Subject: [PATCH 4/5] feat: Add words to wordlist --- .wordlist.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index 0aec2ce76..e39e65674 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -331,6 +331,7 @@ ESLint ESlint EcmaScript Eine +ElastiCache ElasticSearch ElasticsearchDefinition ElasticsearchEntityAggregator @@ -611,6 +612,7 @@ OAuth OPENSEARCH ORM ORMs +OSS OTEL OTLP ObjectField @@ -858,6 +860,7 @@ SeoUrlRoute SeoUrlTemplate SerializedField SetNullOnDelete +Serverless ShippingCountryRule ShippingMethodPriceCollector ShippingMethodRoute @@ -994,6 +997,7 @@ UpdatedBy UpdatedByField UpperCamelCase Upserting +Upstash Upsun UrlAware UrlStorer @@ -1006,6 +1010,7 @@ VARCHAR VCL VCS VM +VPC VSCode Validator Valkey @@ -1779,6 +1784,7 @@ setProductFixtureVisibility setSalesChannelDomain setToInitialState settingsItem +serverless sha shakable shallowMount From 5e805018b4574ced0f059abe342f9b4488176cb1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 9 Jan 2026 13:22:50 +0000 Subject: [PATCH 5/5] chore: sort .wordlist.txt --- .wordlist.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wordlist.txt b/.wordlist.txt index e39e65674..c7266f824 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -859,8 +859,8 @@ Sendfile SeoUrlRoute SeoUrlTemplate SerializedField -SetNullOnDelete Serverless +SetNullOnDelete ShippingCountryRule ShippingMethodPriceCollector ShippingMethodRoute @@ -1778,13 +1778,13 @@ seperate seperated serializable serializer +serverless setFlags setLocaleToEnGb setProductFixtureVisibility setSalesChannelDomain setToInitialState settingsItem -serverless sha shakable shallowMount