This is the source code for Nimbus. Although this wasn't designed to be run as a personal service, there is nothing stoping you from doing that if you want to, as long as you don't run it commercially. Feel free to contribute to this project or fork it, just make sure to provide attribution. More inforamtion is available on the wiki.
Setup is pretty standard although there are certain assumptions made. One of which is that the application has only been tested using MRI/YARV 2.0. Just run bundle install
and let it install everything. Note that you will probbaly want to install it without the test or production group using bunele install --without test production
, as the test and production groups require several external dependencies. To get the node.js portion running, you need to install the faye
and
faye-redis
packages to the faye directoy. This can be done by going into the directory and running npm install faye faye-redis
. Additionally, you must define several environmental variables when running this in order for the respective functionality to work. You must also have Redis installed. You can use Foreman to run the entire thing.
###Environmental Variables
Nimbus requires several environmental variables to be run properly. This can be done by editing the user profile or adding a script to /etc/profile.d/
. It is not reccomended to do this as a Rails initializer as the node.js app relies on some of these as well. An example script is included as env.example.sh
. Make sure to make it executable after copting it.
-
HOST
The being used, for example
nimbuu.us
If none is provided,127.0.0.1
is used -
SOCKET_KEY
The encryption key useed by HMAC to authenticate Faye messages
-
SOCKET_MASTER
The random number that can be used as an auth_token to bypass HMAC based veriication
-
REDIS_URL
The Redis URL being used, eg redis://127.0.0.1:6379
If none is provided, the above is assumed
-
SECRET_TOKEN
The token used for rails cookies
If one is not provided, athere is a built in one, this is fine for development but would be insecure for production -
RECAPTCHA_PUBLIC_KEY
The public key used for RECAPTCHA
If none is provided RECAPTCHA is disabled -
RECAPTCHA_PRIVATE_KEY
The private key used for RECAPTCHA
The following are the Cryptographic keys used for OAuth on the various providers.
- BOX_CLIENT_ID
- BOX_CLIENT_SECRET
- DROPBOX_CLIENT_ID
- DROPBOX_CLIENT_SECRET
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- SKYDRIVE_CLIENT_ID
- SKYDRIVE_CLIENT_SECRET
Nimbus is deployed on Digital Ocean on two servers, each running Centos 6.4. Deployment is handled using Capistrano, but that script is not included as it it deployment specific and also contains sensitive information.
One runs Clockwork, Redis, Postgres, Sidekiq, and Nginx as a reverse proxy / load balancer / SSL terminator.
A second server runs the rails app using Unicorn, as well as the node.js app using Faye.
- Ruby on Rails
- Sidekiq
- Clockwork
- Redis
- RSpec/Capybara
- node.js
- Faye
- Zurb Foundation
- jQuery
- Elementary Icons
- bcrypt
- Unicorn
- PostgreSQL
- A ton of Gems listed in the Gemfile