Installable push sending service which can control push targets
with their properties by notification's conditions.
- docker >= 19.03.8
- docker-compose >= 1.25.5
- python >= 3.7
------- Select FCM API version
| $ export PUSH_WORKER__FCM__LEGACY__SERVER_KEY={..fcm server key..}
| $ export PUSH_WORKER__FCM__CLIENT=legacy
-------
| $ export PUSH_WORKER__FCM__V1__KEY_FILE_NAME={..fcm service account key path..}
| $ export PUSH_WORKER__FCM__V1__PROJECT_ID={..fcm project id..}
| $ export PUSH_WORKER__FCM__CLIENT=v1
-------
------- Select APNs authorization method
| $ export PUSH_WORKER__APNS__P8_CERT__FILE_NAME={..apple apns p8 file path..}
| $ export PUSH_WORKER__APNS__P8_CERT__KEY_ID={..apple apns key_id..}
| $ export PUSH_WORKER__APNS__P8_CERT__TEAM_ID={..apple team_id..}
| $ export PUSH_WORKER__APNS__P8_CERT__TOPIC={..apple product bundle id..}
| $ export PUSH_WORKER__APNS__CERT_TYPE=p8
-------
| $ export PUSH_WORKER__APNS__PEM_CERT__FILE_NAME={..apple apns pem file path..}
| $ export PUSH_WORKER__APNS__CERT_TYPE=pem
-------
$ docker-compose -f local-docker-compose.yml up -d
/
/apiserver
/worker
/messaging
/apns
/fcm
/notification
-
- Endpoint for client can attach through REST API
- Take roles about register device/notification
- Also it shows device's event for notification
- Publish job for 'Notification worker'
-
- Find devices comfort notification's condition and publish job for 'Push worker'
- Client for update notifications' sent result
-
- Client for send push message to each send platform like: FCM, APNs
- Publish job back for 'Notification worker' to update notification sent result (success / failed)
_________________________
v _____ | _____
[API server] --(____()----> [Notification worker] ----(____()---> [Messaging(APNS) worker] ---+
^ +--(____()---> [Messaging(FCM) worker] ----+
| ______ |
+-----------------(_____()-----------------------------------------+
- APIServer
- NotificationWorker
- MessagingWorker(FCM/APNS)
-
FCM worker can't send notification with 403
{"code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED"}}
You should set permission "cloudmessaging.messages.create"
- Extract PEM file from *.p12
openssl pkcs12 -in {P12 FILE} -out {EXPORTED PEM FILE} -nodes -clcerts