Skip to content

Commit 5ded2cf

Browse files
committed
docs: update cache and environment variable documentation for Redis TLS and ACL support
1 parent 17e42de commit 5ded2cf

2 files changed

Lines changed: 63 additions & 74 deletions

File tree

apps/docs/docs/cache.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,23 @@ No additional configuration is required to use the local cache.
4848
REDIS_USERNAME=your-redis-username // optional for ACL authentication
4949
REDIS_CA_CERT_B64=base64-encoded-ca-certificate // optional for TLS with custom CA
5050
```
51-
51+
5252
:::tip TLS/SSL Configuration
53-
53+
5454
If you're using Redis with TLS/SSL and a custom CA certificate:
5555
- Set `REDIS_USE_TLS=true`
5656
- Set `REDIS_CA_CERT_B64` to your base64-encoded PEM certificate
5757
- To encode your certificate: `cat certificate.pem | base64 -w 0`
58-
58+
5959
:::
60-
60+
6161
:::info ACL Authentication
62-
62+
6363
If your Redis server uses ACL (Access Control Lists):
6464
- Set `REDIS_USERNAME` to your Redis username
6565
- Ensure `REDIS_PASSWORD` is set to the corresponding password
66-
66+
6767
:::
68+
6869
</TabItem>
6970
</Tabs>

apps/docs/docs/environment.mdx

Lines changed: 56 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,100 +9,88 @@ You can set these variables in a `.env` file for local development or in your de
99

1010
## Supported Environment Variables
1111

12-
### 🌍 **API Configuration**
1312

14-
| Name | Required | Description | Example | Reference |
15-
| ---------- | -------- | ----------------------- | ------------------------ | ----------------------------------- |
16-
| `BASE_URL` || Root URL of your server | `https://ota.mysite.com` | [Ref](/docs/prerequisites#base-url) |
13+
### 🌍 **API Configuration**
14+
| Name | Required | Description | Example | Reference |
15+
| --- | --- | --- | --- | --- |
16+
| `BASE_URL` || Root URL of your server | `https://ota.mysite.com` | [Ref](/docs/prerequisites#base-url) |
1717

1818
### 🔑 **Authentication & Security**
19-
20-
| Name | Required | Description | Example | Reference |
21-
| ------------ | -------- | -------------------------------------- | --------------- | ------------------------------------- |
22-
| `JWT_SECRET` || JWT secret used to sign some endpoints | `Random string` | [Ref](/docs/prerequisites#jwt-secret) |
19+
| Name | Required | Description | Example | Reference |
20+
| --- | --- | --- | --- | --- |
21+
| `JWT_SECRET` || JWT secret used to sign some endpoints | `Random string` | [Ref](/docs/prerequisites#jwt-secret) |
2322

2423
### 📱 **Expo Configuration**
25-
26-
| Name | Required | Description | Example | Reference |
27-
| ------------------- | -------- | -------------------------- | --------------- | ----------------------------------------------------- |
28-
| `EXPO_APP_ID` || The ID of the Expo project | `Random string` | [Ref](/docs/prerequisites#how-to-get-your-project-id) |
29-
| `EXPO_ACCESS_TOKEN` || Expo access token | `Random string` | [Ref](/docs/prerequisites#how-to-get-your-expo-token) |
24+
| Name | Required | Description | Example | Reference |
25+
| --- | --- | --- | --- | --- |
26+
| `EXPO_APP_ID` || The ID of the Expo project | `Random string` | [Ref](/docs/prerequisites#how-to-get-your-project-id) |
27+
| `EXPO_ACCESS_TOKEN` || Expo access token | `Random string` | [Ref](/docs/prerequisites#how-to-get-your-expo-token) |
3028

3129
### **Cache Configuration**
32-
33-
| Name | Required | Description | Example | Reference |
34-
| ------------------- | -------------------------- | ------------------------------------- | --------------- | ------------------------------ |
35-
| `CACHE_MODE` || `local` or `redis` | `local` | [Ref](/docs/cache) |
36-
| `REDIS_HOST` | ✅ if CACHE_MODE = `redis` | Redis host | `127.0.0.1` | [Ref](/docs/cache?cache=redis) |
37-
| `REDIS_PORT` | ✅ if CACHE_MODE = `redis` | Redis port | `6379` | [Ref](/docs/cache?cache=redis) |
38-
| `REDIS_PASSWORD` | ✅ if CACHE_MODE = `redis` | Redis password | `password` | [Ref](/docs/cache?cache=redis) |
39-
| `REDIS_USE_TLS` || Enable TLS/SSL connection | `true` | [Ref](/docs/cache?cache=redis) |
40-
| `REDIS_USERNAME` || Redis username for ACL authentication | `myuser` | [Ref](/docs/cache?cache=redis) |
41-
| `REDIS_CA_CERT_B64` || Base64-encoded CA certificate for TLS | `Base64 string` | [Ref](/docs/cache?cache=redis) |
30+
| Name | Required | Description | Example | Reference |
31+
| --- | --- | --- | --- | --- |
32+
| `CACHE_MODE` || `local` or `redis` | `local` | [Ref](/docs/cache) |
33+
| `REDIS_HOST` | ✅ if CACHE_MODE = `redis` | Redis host | `127.0.0.1` | [Ref](/docs/cache?cache=redis) |
34+
| `REDIS_PORT` | ✅ if CACHE_MODE = `redis` | Redis port | `6379` | [Ref](/docs/cache?cache=redis) |
35+
| `REDIS_PASSWORD` | ✅ if CACHE_MODE = `redis` | Redis password | `password` | [Ref](/docs/cache?cache=redis) |
36+
| `REDIS_USE_TLS` || Enable TLS/SSL connection | `true` | [Ref](/docs/cache?cache=redis) |
37+
| `REDIS_USERNAME` || Redis username for ACL authentication | `myuser` | [Ref](/docs/cache?cache=redis) |
38+
| `REDIS_CA_CERT_B64` || Base64-encoded CA certificate for TLS | `Base64 string` | [Ref](/docs/cache?cache=redis) |
4239

4340
### 📦 **Storage Configuration**
44-
45-
| Name | Required | Description | Example | Reference |
46-
| ------------------------ | ---------------------------- | -------------------- | ----------------- | ---------------------------------- |
47-
| `STORAGE_MODE` || `local` or `s3` | `local` | [Ref](/docs/storage) |
48-
| `S3_BUCKET_NAME` | ✅ if STORAGE_MODE = `s3` | S3 bucket name | `my-bucket` | [Ref](/docs/storage?storage=s3) |
41+
| Name | Required | Description | Example | Reference |
42+
| --- | --- | --- | --- | --- |
43+
| `STORAGE_MODE` || `local` or `s3` | `local` | [Ref](/docs/storage) |
44+
| `S3_BUCKET_NAME` | ✅ if STORAGE_MODE = `s3` | S3 bucket name | `my-bucket` | [Ref](/docs/storage?storage=s3) |
4945
| `LOCAL_BUCKET_BASE_PATH` | ✅ if STORAGE_MODE = `local` | Path to store assets | `/path/to/assets` | [Ref](/docs/storage?storage=local) |
5046

5147
### 🔐 **Key store Configuration**
52-
53-
| Name | Required | Description | Example | Reference |
54-
| ------------------- | -------- | ------------------------------------------------ | ------------- | ---------------------- |
55-
| `KEYS_STORAGE_TYPE` || `environment`, `aws-secrets-manager`, or `local` | `environment` | [Ref](/docs/key-store) |
48+
| Name | Required | Description | Example | Reference |
49+
| --- | --- | --- | --- | --- |
50+
| `KEYS_STORAGE_TYPE` || `environment`, `aws-secrets-manager`, or `local` | `environment` | [Ref](/docs/key-store) |
5651

5752
#### **AWS Secrets Manager Key Store**
58-
59-
| Name | Required | Description | Example | Reference |
60-
| ---------------------------------- | ----------------------------------------------- | ----------------------------------- | --------------------- | ----------------------------------------------- |
61-
| `AWSSM_EXPO_PUBLIC_KEY_SECRET_ID` | ✅ if KEYS_STORAGE_TYPE = `aws-secrets-manager` | Expo public key secret name in AWS | `my-expo-public-key` | [Ref](/docs/key-store#expo-signing-certificate) |
53+
| Name | Required | Description | Example | Reference |
54+
| --- | --- | --- | --- | --- |
55+
| `AWSSM_EXPO_PUBLIC_KEY_SECRET_ID` | ✅ if KEYS_STORAGE_TYPE = `aws-secrets-manager` | Expo public key secret name in AWS | `my-expo-public-key` | [Ref](/docs/key-store#expo-signing-certificate) |
6256
| `AWSSM_EXPO_PRIVATE_KEY_SECRET_ID` | ✅ if KEYS_STORAGE_TYPE = `aws-secrets-manager` | Expo private key secret name in AWS | `my-expo-private-key` | [Ref](/docs/key-store#expo-signing-certificate) |
6357

6458
#### **Environment-Based Key Store**
65-
66-
| Name | Required | Description | Example | Reference |
67-
| ---------------------- | --------------------------------------- | ------------------------------- | --------------- | ----------------------------------------------- |
68-
| `PUBLIC_EXPO_KEY_B64` | ✅ if KEYS_STORAGE_TYPE = `environment` | Base64-encoded Expo public key | `Base64 string` | [Ref](/docs/key-store#expo-signing-certificate) |
59+
| Name | Required | Description | Example | Reference |
60+
| --- | --- | --- | --- | --- |
61+
| `PUBLIC_EXPO_KEY_B64` | ✅ if KEYS_STORAGE_TYPE = `environment` | Base64-encoded Expo public key | `Base64 string` | [Ref](/docs/key-store#expo-signing-certificate) |
6962
| `PRIVATE_EXPO_KEY_B64` | ✅ if KEYS_STORAGE_TYPE = `environment` | Base64-encoded Expo private key | `Base64 string` | [Ref](/docs/key-store#expo-signing-certificate) |
7063

7164
#### **Local Key Store**
72-
73-
| Name | Required | Description | Example | Reference |
74-
| ----------------------------- | --------------------------------- | ---------------------------- | -------------------------- | ----------------------------------------------- |
65+
| Name | Required | Description | Example | Reference |
66+
| --- | --- | --- | --- | --- |
7567
| `PRIVATE_LOCAL_EXPO_KEY_PATH` | ✅ if KEYS_STORAGE_TYPE = `local` | Path to the Expo private key | `/path/to/private-key.pem` | [Ref](/docs/key-store#expo-signing-certificate) |
76-
| `PUBLIC_LOCAL_EXPO_KEY_PATH` | ✅ if KEYS_STORAGE_TYPE = `local` | Path to the Expo public key | `/path/to/public-key.pem` | [Ref](/docs/key-store#expo-signing-certificate) |
68+
| `PUBLIC_LOCAL_EXPO_KEY_PATH` | ✅ if KEYS_STORAGE_TYPE = `local` | Path to the Expo public key | `/path/to/public-key.pem` | [Ref](/docs/key-store#expo-signing-certificate) |
7769

7870
### ☁️ **AWS & CloudFront Configuration**
79-
80-
| Name | Required | Description | Example | Reference |
81-
| ----------------------- | ----------------------------------------------------------- | ------------------------------------------------------------ | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
82-
| `AWS_REGION` | ✅ if using `aws-secrets-manager` or `s3` | AWS Region | `us-east-1` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
83-
| `AWS_BASE_ENDPOINT` || Custom S3-compatible endpoint for alternative object storage | `https://account-id.r2.cloudflarestorage.com` | [Storage](/docs/storage?storage=s3) |
84-
| `AWS_ACCESS_KEY_ID` | ✅ if using `aws-secrets-manager` or `s3` without IAM roles | AWS Access Key ID | `ACCESSKEYID` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
85-
| `AWS_SECRET_ACCESS_KEY` | ✅ if using `aws-secrets-manager` or `s3` without IAM roles | AWS Secret Access Key | `SECRETACCESSKEY` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
71+
| Name | Required | Description | Example | Reference |
72+
| --- | --- | --- | --- | --- |
73+
| `AWS_REGION` | ✅ if using `aws-secrets-manager` or `s3` | AWS Region | `us-east-1` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
74+
| `AWS_BASE_ENDPOINT` || Custom S3-compatible endpoint for alternative object storage | `https://account-id.r2.cloudflarestorage.com` | [Storage](/docs/storage?storage=s3) |
75+
| `AWS_ACCESS_KEY_ID` | ✅ if using `aws-secrets-manager` or `s3` without IAM roles | AWS Access Key ID | `ACCESSKEYID` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
76+
| `AWS_SECRET_ACCESS_KEY` | ✅ if using `aws-secrets-manager` or `s3` without IAM roles | AWS Secret Access Key | `SECRETACCESSKEY` | [Ref](/docs/key-store?keyStore=aws-secrets-manager#key-store-configuration), [Storage](/docs/storage?storage=s3) |
8677

8778
#### **CloudFront Settings**
88-
89-
| Name | Required | Description | Example | Reference |
90-
| ---------------------------------------- | ------------------------------------------------------------ | --------------------------------------------- | ------------------------------------- | --------------------------- |
91-
| `CLOUDFRONT_DOMAIN` || CloudFront domain | `https://XXX.cloudfront.net` | [Ref](/docs/cdn/cloudfront) |
92-
| `CLOUDFRONT_KEY_PAIR_ID` | ✅ if CLOUDFRONT_DOMAIN is set | CloudFront key pair ID | `Random string` | [Ref](/docs/cdn/cloudfront) |
93-
| `CLOUDFRONT_PRIVATE_KEY_B64` | ✅ if using `environment` & CLOUDFRONT_DOMAIN is set | Base64 CloudFront private key | `Base64 string` | [Ref](/docs/cdn/cloudfront) |
94-
| `AWSSM_CLOUDFRONT_PRIVATE_KEY_SECRET_ID` | ✅ if using `aws-secrets-manager` & CLOUDFRONT_DOMAIN is set | CloudFront private key in AWS Secrets Manager | `my-cloudfront-private-key` | [Ref](/docs/cdn/cloudfront) |
95-
| `PRIVATE_LOCAL_CLOUDFRONT_KEY_PATH` | ✅ if using `local` & CLOUDFRONT_DOMAIN is set | Path to CloudFront private key | `/path/to/cloudfront-private-key.pem` | [Ref](/docs/cdn/cloudfront) |
79+
| Name | Required | Description | Example | Reference |
80+
| --- | --- | --- | --- | --- |
81+
| `CLOUDFRONT_DOMAIN` || CloudFront domain | `https://XXX.cloudfront.net` | [Ref](/docs/cdn/cloudfront) |
82+
| `CLOUDFRONT_KEY_PAIR_ID` | ✅ if CLOUDFRONT_DOMAIN is set | CloudFront key pair ID | `Random string` | [Ref](/docs/cdn/cloudfront) |
83+
| `CLOUDFRONT_PRIVATE_KEY_B64` | ✅ if using `environment` & CLOUDFRONT_DOMAIN is set | Base64 CloudFront private key | `Base64 string` | [Ref](/docs/cdn/cloudfront) |
84+
| `AWSSM_CLOUDFRONT_PRIVATE_KEY_SECRET_ID` | ✅ if using `aws-secrets-manager` & CLOUDFRONT_DOMAIN is set | CloudFront private key in AWS Secrets Manager | `my-cloudfront-private-key` | [Ref](/docs/cdn/cloudfront) |
85+
| `PRIVATE_LOCAL_CLOUDFRONT_KEY_PATH` | ✅ if using `local` & CLOUDFRONT_DOMAIN is set | Path to CloudFront private key | `/path/to/cloudfront-private-key.pem` | [Ref](/docs/cdn/cloudfront) |
9686

9787
#### **Prometheus Configuration**
98-
99-
| Name | Required | Description | Example | Reference |
100-
| -------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- |
101-
| `PROMETHEUS_ENABLED` | ❌ (Automatic) | Automatically set to `true` if `prometheus.io/scrape: "true"` is present in `podAnnotations`, otherwise must be explicitly set to `true` | `true` | |
88+
| Name | Required | Description | Example | Reference |
89+
| --- | --- | --- | --- | --- |
90+
| `PROMETHEUS_ENABLED` | ❌ (Automatic) | Automatically set to `true` if `prometheus.io/scrape: "true"` is present in `podAnnotations`, otherwise must be explicitly set to `true` | `true` | |
10291

10392
#### **Dashboard Configuration**
104-
105-
| Name | Required | Description | Example | Reference |
106-
| ---------------- | -------------------------- | -------------------- | --------------- | ---------------------- |
107-
| `USE_DASHBOARD` || Enable the dashboard | `true` | [Ref](/docs/dashboard) |
108-
| `ADMIN_PASSWORD` | ✅ if USE_DASHBOARD is set | Admin password | `Random string` | [Ref](/docs/dashboard) |
93+
| Name | Required | Description | Example | Reference |
94+
| --- | --- | --- | --- | --- |
95+
| `USE_DASHBOARD` || Enable the dashboard | `true` | [Ref](/docs/dashboard) |
96+
| `ADMIN_PASSWORD` | ✅ if USE_DASHBOARD is set | Admin password | `Random string` | [Ref](/docs/dashboard) |

0 commit comments

Comments
 (0)