Reward our beloved players.
API_SECRET — secret to compare to for internal access level
APP_1_NAME — Name of first app to monitor
APP_2_NAME — Name of second app to monitor
Reward Information (reward is sent to App 1)
REWARD_APP_1_USER_LOGIN_APP_2_ID — a string to be saved as data.rewardId in reward infoREWARD_APP_1_USER_LOGIN_APP_2_AMOUNT — an integer specifying amount to rewardREWARD_APP_1_USER_LOGIN_APP_2_CURRENCY — a string specifying currency to awardganomede-events instance
EVENTS_PORT_8000_TCP_[ADDR|PORT|PROTOCOL] — IP|Port|Protocol to the events serviceEVENTS_CLIENT_ID — non-empty string to [identify this worker](https://github.com/j3k0/ -anomede-events#new-clientclientid-options)EVENTS_CHANNEL — non-empty string, defaults to "users/v1", channel to listen for -vents onEVENTS_PREFIX — api prefix, defaults to "/events/v1"virtual currency of App 1
APP_1_VIRTUALCURRENCY_PORT_8000_TCP_[ADDR|PORT|PROTOCOL] — IP|port|protocol of the virtualcurrency service for app 1APP_1_VIRTUALCURRENCY_PREFIX — api prefix, defaults to "/virtualcurrency/v1"usermeta of App 1
APP_1_USERMETA_PORT_8000_TCP_[ADDR|PORT|PROTOCOL] — IP|Port|Protocol to the usermeta serviceAPP_1_USERMETA_PREFIX — api prefix, defaults to "/usermeta/v1"StatsD for tracking stats (if host or port are missing, no stats will be sent)
STATSD_HOSTSTATSD_PORTSTATSD_PREFIX defaults to "mailchimp.registrations."This will track 4 integers:
events total number of received eventsfailure number of errorssuccess number of successesignored number of ignored eventsHTTP status server
HOST non-empty string, defaults to "0.0.0.0"PORT non-empty string, defaults to 8000This module handles a single type of reward. More might come.
Apps emit events to the same ganomede-events instance, with from set to their respective app names (see APP_x_NAME).
LOGIN events on the users channel (as specified here: https://github.com/j3k0/ganomede-users/pull/25).APP_2_NAME.APP_2_USERMETA the "$reward$" + REWARD_APP_1_USER_LOGIN_APP_2_ID internal key.
"$reward$" + REWARD_APP_1_USER_LOGIN_APP_2_ID internal key.APP_2_VIRTUALCURRENCY using the internal reward call with
REWARD_APP_1_USER_LOGIN_APP_2_CURRENCYREWARD_APP_1_USER_LOGIN_APP_2_AMOUNTREWARD_APP_1_USER_LOGIN_APP_2_ID }For monitoring, include /about and /ping calls on port 8000.
Just start from JS boilerplate.
Content type
Image
Digest
Size
109.3 MB
Last updated
almost 9 years ago
docker pull ganomede/rewards