Reportr/dashboard

Environment agnostic install & start script/instructions

medikoo opened this issue · 6 comments

I've tried to install reportr on my own server, while I found that instructions in readme assume installation on Heroku, with which I'm not familiar.

I think install and start of application, shouldn't cost more than npm install && npm start on any *nix environment, however I don't see configured start script, so I'm not sure where to go after npm install

Take a look at https://github.com/SamyPesse/reportr/blob/master/Procfile-free. Essentially once you've ran npm install all you need to do is run node bin/reportr.js run --mode=all.

You will also need to set a few environment variables that are used to configure reportr (using environment variables is a best practice, to provide flexible configuration at runtime to an app).

You should check out https://github.com/SamyPesse/reportr/blob/master/lib/config/main.js, to see which environment variables reportr accepts. (Look at variables with this process.env.* pattern).

reportr does of course provide defaults for these, but you'll most likely want to override them.

We could set node bin/reportr.js run --mode=all to the "start" script in the package.json. But even without it, it's rather obvious IMHO (the environment variable and configuration stuff might be less).

Give that a try, hope it works for you.

PS: I don't actively contribute to reportr but I'm Samy's co-founder @FriendCode, and reportr is built following many patterns we use internally so I'm familiar with the overall code structure.

Thanks for great explanation. I think node bin/reportr.js run --mode=all should be configured as start script then, at least I don't see how it's obvious (not a word about that in main documentation)

First of all: thanks @AaronO and @SamyPesse for Reportr! Awesome project.
Then I am with @medikoo on this one, so for other non-herokuans here is a script that gets you started and is working on Amazon EC2/Ubuntu 12.04.

So to just get this running with port 8000 and no credentials at all you can do this:

sudo apt-get install -y mongodb

git clone https://github.com/SamyPesse/reportr.git && cd ./reportr
npm install
make build

echo -e "
PORT=8000 \
FACEBOOK_CLIENTID=1 \
FACEBOOK_CLIENTSECRET=1 \
TWITTER_CLIENTID=1 \
TWITTER_CLIENTSECRET=1 \
FOURSQUARE_CLIENTID=1 \
FOURSQUARE_CLIENTSECRET=1 \
GITHUB_CLIENTID=1 \
GITHUB_CLIENTSECRET=1 \
RUNKEEPER_CLIENTID=1 \
RUNKEEPER_CLIENTSECRET=1 \
FITBIT_CLIENTID=1 \
FITBIT_CLIENTSECRET=1 \
node bin/reportr.js run --mode=all" > run.sh

chmod +x run.sh
./run.sh

👍 @dirkk0 worked for me on ubuntu 12.04

@missinglink great, thank you!

Thank you @dirkk0