Closed gvilarino closed 8 years ago
@gvilarino,
There are still a couple of items about notifier that are not completely clear to me. It might be helpful to clarify those on wiki for other people as well.
Answering your questions:
notifier
, and only a user database should be accessed by the latter (for user preferences, email addresses, etc.). In that way, notifier
is agnostic to business data and thus can be used even by external services to notifiy DemocracyOS
users about stuff.2.
, users. Check out the latest commits under development
.null
as the value, you can just use an empty string; might prevent unwanted results.Thanks @gvilarino,
I think I'm doing everything correctly but the notifier still refuses to send emails. Here are all my steps. Perhaps we could figure out what I'm doing wrong and update the wiki with all the right steps.
I have not set the rest of the variables because I'm not using those services. Maybe that's where the problem is. I was not sure if those are optional or mandatory.
I guess I also need to figure out why my text formatting is all getting changed when I submit my comments.
Forgot to add to the following item:
@tarasdudar you just need to specify a valid mandill API key under MANDRILL_TOKEN
for the notifier to work. I suggest you try locally first to double-check everything is cool with your settings, before pushing to heroku. You don't need to create new mandril/mongoDB add-ons on heroku if your DemocracyOS deployment already had them.
Also, regarding your comment formatting, I suggest you hit Preview
before submitting a comment. For more on how formatting markdon here, read the markdown guide for github, more especially the one on doing unformatted text.
Thanks @gvilarino,
In my latest debug experiment I've tried to copy MANDRILL settings from my DemocracyOS deployment to notifier. The Mandrill used to work fine with those USERNAME and API settings and I was getting all the emails upgrading DemocracyOS to 0.9.0. Doing that did not fix the problem but I still have Mandrill running in my DemocracyOS app with the same settings. Maybe it does not work like that. I'll remove Mandrill from notifier and see if that helps.
Regarding MongoDB. My understanding was that I need a second MongoDB for "users" anyway. So I thought the easy way to get it was to add it to the notifier app. Is there any better way of setting it up?
You don't need to remove mandrill from your DemocracyOS; you don't need to set up MANDRILL_USERNAME
for notifier, just the API key under MANDRILL_TOKEN
. Mails should go out with no problem.
OK, I've removed the Mandrill from notifier, it is still running in DemocracyOS and still no email. Here is the reformatted and updated sequence of steps. I'll try to write it such that we could use it for a wiki.
This guide assumes that you have already installed DemocracyOS version 0.9.1 or higher instance on heroku. To function properly each instance of DemocracyOS needs to be connected to the notifier server and have an additional MongoDB (MongoLab) database setup to store user information. For the purpose of this guide let's assume that the name of your DemocracyOS instance is my-democracyOS-instance. It is up and running with the following URL: my-democracyOS-instance.herokuapp.com.
I'm not sure why your deployment isn't working; please send an email to the dev mailing list with your notifier logs; that way I could help.
We already got a wiki in this very repo, with installation instructions and all (feel free to contribute, tho).
Some caveats to what you propose:
ACCESS_TOKEN
isn't a number, it's a string.MONGOLAB_URI
or MONGO_CONNECTION
; a MONGO_URL
will do.npm install notifier-client
for DemocracyOS
to work; it's a node dependency described in DemocracyOS' package.json.Thanks @gvilarino,
I've renamed the MONGO_CONNECTION variable to MONGO_URL on the wiki page. I'll try to update it more after we figure everything out. I've sent the email to dev with my log. It looks like notifier app is running as "development" and it should be as "production". How do I change that?
@tarasdudar exactly as with DemocracyOS: NODE_ENV
This is sort of done; probably will need to perfect it more but it's a make-do right now: https://github.com/DemocracyOS/notifier/wiki
Next steps: make README.md easier and relying more on the wiki.
Related with #18