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
We provide already built MongoosePush images. If you just want to use it, then all you need is `docker`, `FCM` app token and/or `APNS` app certificates.
15
+
We provide already built MongoosePush images. If you just want to use it, then all you need is `docker`, `FCM` app token and/or `APNS` app certificates and/or `Pushy` app token.
16
16
In case of certificates you need to setup the following directory structure:
17
17
* priv/
18
18
* ssl/
@@ -24,16 +24,23 @@ In case of certificates you need to setup the following directory structure:
24
24
* dev_cert.pem - Development APNS app certificate
25
25
* dev_key.pem - Development APNS app certificate's private key (has to be unencrypted)
26
26
27
-
Assuming that your `FCM` app token is "MY_FCM_SECRET_TOKEN"and you have the `priv` directory with all ceriticates in current directory, then you may start MongoosePush with the following command:
27
+
Assuming that your `FCM` app token is "MY_FCM_SECRET_TOKEN", `Pushy` app token is "MY_PUSHY_SECRET_TOKEN" and you have the `priv` directory with all certificates in current directory, then you may start MongoosePush with the following command:
Please note that each push service that is being used has to be enabled by `PUSH_FCM_ENABLED` / `PUSH_APNS_ENABLED` / `PUSH_PUSHY_ENABLED` as
42
+
all services are disabled by default. In the example above, we enable all push services, but you may want to skip some of them.
43
+
37
44
#### Building
38
45
39
46
Building docker is really easy, just type:
@@ -64,14 +71,20 @@ Environmental variables to configure production release:
64
71
65
72
##### General settings:
66
73
*`PUSH_LOGLEVEL` - `debug`/`info`/`warn`/`error` - Log level of the application. `info` is the default one
67
-
*`PUSH_FCM_ENABLED` - `true`/`false` - Enable or disable `FCM` support. Enabled by default
68
-
*`PUSH_APNS_ENABLED` - `true`/`false` - Enable or disable `APNS` support. Enabled by default
74
+
*`PUSH_FCM_ENABLED` - `true`/`false` - Enable or disable `FCM` support. Disabled by default
75
+
*`PUSH_APNS_ENABLED` - `true`/`false` - Enable or disable `APNS` support. Disabled by default
76
+
*`PUSH_PUSHY_ENABLED` - `true`/`false` - Enable or disable `Pushy` support. Disabled by default
69
77
70
78
##### Settings for FCM service:
71
79
*`PUSH_FCM_ENDPOINT` - Hostname of `FCM` service. Set only for local testing. By default this option points to the Google's official hostname
72
80
*`PUSH_FCM_APP_KEY` - App key token to use with `FCM` service
73
81
*`PUSH_FCM_POOL_SIZE` - Connection pool size for `FCM` service
74
82
83
+
##### Settings for Pushy service:
84
+
*`PUSH_PUSHY_ENDPOINT` - Hostname of `Pushy` service. Set only for local testing. By default this option points to the Google's official hostname
85
+
*`PUSH_PUSHY_APP_KEY` - App key token to use with `Pushy` service
86
+
*`PUSH_PUSHY_POOL_SIZE` - Connection pool size for `Pushy` service. Please note that `Pushy` uses HTTP 1.1, so the pool size has be be significantly bigger then in case of other services that run on HTTP/2
87
+
75
88
##### Settings for development APNS service:
76
89
*`PUSH_APNS_DEV_ENDPOINT` - Hostname of `APNS` service. Set only for local testing. By default this option points to the Apple's official hostname
77
90
*`PUSH_APNS_DEV_CERT` - Path Apple's development certfile used to communicate with `APNS`
@@ -159,6 +172,28 @@ Each `FCM` pool may be configured by setting the following fields:
159
172
160
173
You may entirely skip the `FCM` config entry to disable `FCM` support.
161
174
175
+
### Pushy configuration
176
+
Lets take a look at sample `Pushy` service configuration:
177
+
```elixir
178
+
config :mongoose_push, pushy: [
179
+
default: [
180
+
key:"fake_app_key",
181
+
pool_size:50,
182
+
mode::prod
183
+
]
184
+
]
185
+
```
186
+
187
+
This is a definition of a pool - each pool has a name and configuration. It is possible to have multiple named pools with different configuration, which includes pool size, environment mode etc. Currently the only reason you may want to do this, is to create separate production and development pools which may be selected by an `HTTP` client by specifying matching `:mode` in their push request.
188
+
189
+
Each `Pushy` pool may be configured by setting the following fields:
190
+
***key** (*required*) - you `Pushy` Server Key
191
+
***pool_size** (*required*) - maximum number of used `HTTP 1.1` connections to Pushy service
192
+
***mode** (*either `:prod` or `:dev`*) - pool's mode. The `HTTP` client may select pool used to push a notification by specifying matching option in the request
193
+
***endpoint** (*optional*) - URL override for `Pushy` service. Useful mainly in tests
194
+
195
+
You may entirely skip the `Pushy` config entry to disable `Pushy` support.
196
+
162
197
### APNS configuration
163
198
164
199
Lets take a look at sample `APNS` service configuration:
0 commit comments