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: README.md
+56-8Lines changed: 56 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ The Redis client to be used to upload files to the Redis store. By default this
133
133
134
134
A message that will be displayed after the file has been successfully uploaded to Redis. By default this message will only display if the revision for `revisionData.revisionKey` of the deployment context has been activated.
135
135
136
-
*Default:*
136
+
*Default:*
137
137
138
138
```javascript
139
139
if (context.revisionData.revisionKey&&!context.revisionData.activatedRevisionKey) {
@@ -181,9 +181,10 @@ So, if the `keyPrefix` was configured to be `my-app:index` and there had been 3
181
181
$ redis-cli
182
182
183
183
127.0.0.1:6379> KEYS *
184
-
1) my-app:index:9ab2021411f0cbc5ebd5ef8ddcd85cef
185
-
2) my-app:index:499f5ac793551296aaf7f1ec74b2ca79
186
-
3) my-app:index:f769d3afb67bd20ccdb083549048c86c
184
+
1) my-app:index
185
+
2) my-app:index:9ab2021411f0cbc5ebd5ef8ddcd85cef
186
+
3) my-app:index:499f5ac793551296aaf7f1ec74b2ca79
187
+
4) my-app:index:f769d3afb67bd20ccdb083549048c86c
187
188
```
188
189
189
190
Activating a revison would add a new entry to Redis pointing to the currently active revision:
@@ -194,10 +195,11 @@ $ ember deploy:activate f769d3afb67bd20ccdb083549048c86c
194
195
$ redis-cli
195
196
196
197
127.0.0.1:6379> KEYS *
197
-
1) my-app:index:9ab2021411f0cbc5ebd5ef8ddcd85cef
198
-
2) my-app:index:499f5ac793551296aaf7f1ec74b2ca79
199
-
3) my-app:index:f769d3afb67bd20ccdb083549048c86c
200
-
4) my-app:index:current
198
+
1) my-app:index
199
+
2) my-app:index:9ab2021411f0cbc5ebd5ef8ddcd85cef
200
+
3) my-app:index:499f5ac793551296aaf7f1ec74b2ca79
201
+
4) my-app:index:f769d3afb67bd20ccdb083549048c86c
202
+
5) my-app:index:current
201
203
202
204
127.0.0.1:6379> GET my-app:index:current
203
205
"f769d3afb67bd20ccdb083549048c86c"
@@ -207,6 +209,52 @@ $ redis-cli
207
209
208
210
Activation occurs during the `activate` hook of the pipeline. By default, activation is turned off and must be explicitly enabled by one of the 3 methods above.
209
211
212
+
## What if my Redis server isn't publicly accessible?
213
+
214
+
Not to worry! Just install the handy-dandy `ember-cli-deploy-ssh-tunnel` plugin:
215
+
216
+
```
217
+
ember install ember-cli-deploy-ssh-tunnel
218
+
```
219
+
220
+
Add set up your `deploy.js` similar to the following:
221
+
222
+
```js
223
+
'redis': {
224
+
host:"localhost",
225
+
port:49156
226
+
},
227
+
'ssh-tunnel': {
228
+
username:"your-ssh-username",
229
+
host:"remote-redis-host"
230
+
srcPort:49156
231
+
}
232
+
```
233
+
234
+
_(NB: by default `ssh-tunnel` assigns a random port for srcPort, but we need that
235
+
to be the same for our `redis` config, so I've just hardcoded it above)_
236
+
237
+
### What if my Redis server is only accessible *from* my remote server?
238
+
239
+
Sometimes you need to SSH into a server (a "bastion" server) and then run
240
+
`redis-cli` or similar from there. This is really common if you're using
241
+
Elasticache on AWS, for instance. We've got you covered there too - just
242
+
set your SSH tunnel host to the bastion server, and tell the tunnel to use
0 commit comments