File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## master
4
4
5
+ ## 0.1.2
6
+
7
+ - Use Reverb env vars as defaults in ` anycable:server ` .
8
+
5
9
## 0.1.1
6
10
7
11
- Fix using ` http_broadcas_url ` configuration parameter.
Original file line number Diff line number Diff line change @@ -208,7 +208,35 @@ protected function runBinary($binaryPath)
208
208
$ args = array_merge ($ args , $ extraArgs );
209
209
}
210
210
211
- $ process = new Process ($ args );
211
+ // Set up environment variables
212
+ $ env = $ _ENV ;
213
+
214
+ // Set ANYCABLE_BROADCAST_ADAPTER=http if not set
215
+ if (!isset ($ env ['ANYCABLE_BROADCAST_ADAPTER ' ])) {
216
+ $ env ['ANYCABLE_BROADCAST_ADAPTER ' ] = 'http ' ;
217
+ }
218
+
219
+ // Set ANYCABLE_PUSHER_APP_ID to REVERB_APP_ID if not set and the latter exists
220
+ if (!isset ($ env ['ANYCABLE_PUSHER_APP_ID ' ]) && isset ($ env ['REVERB_APP_ID ' ])) {
221
+ $ env ['ANYCABLE_PUSHER_APP_ID ' ] = $ env ['REVERB_APP_ID ' ];
222
+ }
223
+
224
+ // Set ANYCABLE_PUSHER_APP_KEY to REVERB_APP_KEY if not set and the latter exists
225
+ if (!isset ($ env ['ANYCABLE_PUSHER_APP_KEY ' ]) && isset ($ env ['REVERB_APP_KEY ' ])) {
226
+ $ env ['ANYCABLE_PUSHER_APP_KEY ' ] = $ env ['REVERB_APP_KEY ' ];
227
+ }
228
+
229
+ // Set ANYCABLE_PUSHER_SECRET to REVERB_APP_SECRET if not set and the latter exists
230
+ if (!isset ($ env ['ANYCABLE_PUSHER_SECRET ' ]) && isset ($ env ['REVERB_APP_SECRET ' ])) {
231
+ $ env ['ANYCABLE_PUSHER_SECRET ' ] = $ env ['REVERB_APP_SECRET ' ];
232
+ }
233
+
234
+ // Set ANYCABLE_PRESETS to broker if not set
235
+ if (!isset ($ env ['ANYCABLE_PRESETS ' ])) {
236
+ $ env ['ANYCABLE_PRESETS ' ] = 'broker ' ;
237
+ }
238
+
239
+ $ process = new Process ($ args , null , $ env );
212
240
$ process ->setTimeout (null );
213
241
$ process ->setTty (Process::isTtySupported ());
214
242
You can’t perform that action at this time.
0 commit comments