You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/docs/cache.mdx
+28-7Lines changed: 28 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The **Expo Open OTA server** uses a cache to improve performance and reduce serv
12
12
The cache is primarily used for:
13
13
14
14
1.**Storing the computed `lastUpdateId` for a given platform and runtime version**
15
+
15
16
- This prevents the need to recompute the last update for every request, significantly speeding up responses.
16
17
17
18
2.**Caching the computed manifest**
@@ -22,19 +23,20 @@ The cache is primarily used for:
22
23
The environment variables required for each storage solution are listed below, you can set them in a `.env` file in the root of the project or keep them in a safe place to prepare for deployment.
23
24
:::
24
25
25
-
importTabsfrom'@theme/Tabs';
26
-
importTabItemfrom'@theme/TabItem';
26
+
importTabsfrom"@theme/Tabs";
27
+
importTabItemfrom"@theme/TabItem";
27
28
28
29
<TabsqueryString="cache"defaultValue="local">
29
30
<TabItemvalue="local"label="Local cache"default>
30
31
:::warning
31
32
32
-
This cache solution is not recommended for production use. It is intended for development and testing purposes only.
33
-
If you really want to use it in production, make sure to not have multiple instances of the server running, as the cache is stored locally and not shared between instances.
33
+
This cache solution is not recommended for production use. It is intended for development and testing purposes only.
34
+
If you really want to use it in production, make sure to not have multiple instances of the server running, as the cache is stored locally and not shared between instances.
35
+
36
+
:::
37
+
Local cache is the default cache solution used by the server. It stores the cache in memory and is not shared between instances of the server. This means that the cache is lost when the server is restarted.
38
+
No additional configuration is required to use the local cache.
34
39
35
-
:::
36
-
Local cache is the default cache solution used by the server. It stores the cache in memory and is not shared between instances of the server. This means that the cache is lost when the server is restarted.
37
-
No additional configuration is required to use the local cache.
38
40
</TabItem>
39
41
<TabItemvalue="redis"label="Redis">
40
42
To use Redis as your cache solution, you need to set the following environment variables:
@@ -43,6 +45,25 @@ import TabItem from '@theme/TabItem';
43
45
REDIS_PORT=your-redis-port
44
46
REDIS_PASSWORD=your-redis-password
45
47
REDIS_USE_TLS=true // optional if you are using a TLS connection
48
+
REDIS_USERNAME=your-redis-username // optional for ACL authentication
49
+
REDIS_CA_CERT_B64=base64-encoded-ca-certificate // optional for TLS with custom CA
46
50
```
51
+
52
+
:::tip TLS/SSL Configuration
53
+
54
+
If you're using Redis with TLS/SSL and a custom CA certificate:
55
+
- Set `REDIS_USE_TLS=true`
56
+
- Set `REDIS_CA_CERT_B64` to your base64-encoded PEM certificate
57
+
- To encode your certificate: `cat certificate.pem | base64 -w 0`
58
+
59
+
:::
60
+
61
+
:::info ACL Authentication
62
+
63
+
If your Redis server uses ACL (Access Control Lists):
64
+
- Set `REDIS_USERNAME` to your Redis username
65
+
- Ensure `REDIS_PASSWORD` is set to the corresponding password
|`KEYS_STORAGE_TYPE`| ✅ |`environment`, `aws-secrets-manager`, or `local`|`environment`|[Ref](/docs/key-store)|
49
56
50
57
#### **AWS Secrets Manager Key Store**
51
-
| Name | Required | Description | Example | Reference |
52
-
| --- | --- | --- | --- | --- |
53
-
|`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)|
58
+
59
+
| Name | Required | Description | Example | Reference |
|`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)|
54
62
|`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)|
55
63
56
64
#### **Environment-Based Key Store**
57
-
| Name | Required | Description | Example | Reference |
58
-
| --- | --- | --- | --- | --- |
59
-
|`PUBLIC_EXPO_KEY_B64`| ✅ if KEYS_STORAGE_TYPE = `environment`| Base64-encoded Expo public key |`Base64 string`|[Ref](/docs/key-store#expo-signing-certificate)|
65
+
66
+
| Name | Required | Description | Example | Reference |
|`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)|
66
-
|`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)|
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)|
67
77
68
78
### ☁️ **AWS & CloudFront Configuration**
69
-
| Name | Required | Description | Example | Reference |
70
-
| --- | --- | --- | --- | --- |
71
-
|`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)|
72
-
|`AWS_BASE_ENDPOINT`| ❌ | Custom S3-compatible endpoint for alternative object storage |`https://account-id.r2.cloudflarestorage.com`|[Storage](/docs/storage?storage=s3)|
73
-
|`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)|
74
-
|`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)|
79
+
80
+
| Name | Required | Description | Example | Reference |
|`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)|
75
86
76
87
#### **CloudFront Settings**
77
-
| Name | Required | Description | Example | Reference |
|`CLOUDFRONT_KEY_PAIR_ID`| ✅ if CLOUDFRONT_DOMAIN is set | CloudFront key pair ID |`Random string`|[Ref](/docs/cdn/cloudfront)|
81
-
|`CLOUDFRONT_PRIVATE_KEY_B64`| ✅ if using `environment` & CLOUDFRONT_DOMAIN is set | Base64 CloudFront private key |`Base64 string`|[Ref](/docs/cdn/cloudfront)|
82
-
|`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)|
83
-
|`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)|
88
+
89
+
| Name | Required | Description | Example | Reference |
|`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)|
84
96
85
97
#### **Prometheus Configuration**
86
-
| Name | Required | Description | Example | Reference |
87
-
| --- | --- | --- | --- | --- |
88
-
|`PROMETHEUS_ENABLED`| ❌ (Automatic) | Automatically set to `true` if `prometheus.io/scrape: "true"` is present in `podAnnotations`, otherwise must be explicitly set to `true`|`true`||
98
+
99
+
| Name | Required | Description | Example | Reference |
|`PROMETHEUS_ENABLED`| ❌ (Automatic) | Automatically set to `true` if `prometheus.io/scrape: "true"` is present in `podAnnotations`, otherwise must be explicitly set to `true`|`true`||
89
102
90
103
#### **Dashboard Configuration**
91
-
| Name | Required | Description | Example | Reference |
92
-
| --- | --- | --- | --- | --- |
93
-
|`USE_DASHBOARD`| ❌ | Enable the dashboard |`true`|[Ref](/docs/dashboard)|
94
-
|`ADMIN_PASSWORD`| ✅ if USE_DASHBOARD is set | Admin password |`Random string`|[Ref](/docs/dashboard)|
104
+
105
+
| Name | Required | Description | Example | Reference |
0 commit comments