How do mobile devices get push notifications? The Android app is registering itself with Google Firebase Messaging (former GCM), by using given credentials, built into the app, the app then sends the received push token to the Rocket.Chat Server you are connected to. The RC server then send notifications using the API key, which is related to the key the app is using, together with the token as recipent to Google, which is then sending it to the mobile. If you have your own RC server and want to use the Rocket.Chat cordova app, you would need to configure your server to forward the notifications to the app developers, as they are the only ones, who are able to send push messages to their app. This is done by setting the push gateway. If you develop your own app or just build it yourself, you have to set your credentials from Google Firebase to your server. If you develop your own app, and want other servers to be able to use it, with push, then you need to setup your own gateway, which then has to be used by the other servers. In that case you should use this gateway server.
This project has dependencies, included via submodules, so you have to clone recursively.
either:
set the environment variables
place the credentials in the servers "credentials" directory:
APNS ->
{ "teamId":"YOUR_APPLE_DEVELOPER_TEAM_ID", "key": "THE_KEY_RELATED_TO_THE_p8(also part of the name AuthKey_[KEY].p8)", "appId": "YOUR_APP_ID (Bundle Id)" }
opional
enable forward gateway(allows to support chaining of gateways e.g. your own and gateway.rocket.chat, to support your own as well as the official apps)
docker build .
mount your credentials folder into the container with -v /yourCertsFolder:/certs and run image
e.g. docker run -t gateway -v /yourCertsFolder:/certs -p 0.0.0.0:80:11000 <image id>
adapt the exmaple files under ./k8s for your needs