Skip to content
Mariano edited this page Jan 6, 2015 · 62 revisions

Installation

This is a quick reference to get DemocracyOS up and running on your local machine.

Requirements

To get started with DemocracyOS, you will need to have installed:

Notes

Running on Windows environment is not currently supported. If you happen to be familiar with Docker or Vagrant, please lend us a hand and submit a PR so we can collaborate on a solution for this.

Finally, check your environment variables and read Environments and config files if something is not working properly.

Install

Unix and OS/X

  • Fork or download this repository.
  • cd to the project's location
  • Based on the sample.json create your own configuration (cp config/sample.json config/development.json for default values)
  • Make sure MongoDB is running and reachable as configured in config/development.json.
  • Set the enviroment variable NODE_PATH with value: ..
  • From the root path, run make. (where is the Makefile)
  • For users behind corporate proxy, its recommended to redirect git clone to https (git config --global url."https://".insteadOf git://) and set properly http and https proxy env

(Note: DemocracyOS uses Component, a frontend package manager and build tool that grabs its dependencies from GitHub repositories. Due a GitHub quota limitation with anonymous requests, you may get a build error when running the initial make. If you run into this issue, just follow the instructions from Component - Required Authentication, as instructed in the error logs).

Running

Once DemocracyOS components and dependencies are installed, you can start the application like this:

make run

Take a look at the Makefile for more information about the possible tasks you can run.

You can check the current Democracy OS version running on http://localhost:3000/api

Running in production environment

  1. Configure your environment variables for production; specifically, set NODE_ENV to production
  2. Set your MongoDB instance to run as a service.
  3. From the project's root path, you need to run:
  4. npm install to install node dependencies.
  5. node ./bin/dos-install && node ./bin/dos-config && node ./bin/dos-build && node index.js to build and run the app.

If something goes wrong you can always go back to a clean slate running make clean. If you're running other node services in the same server and you can't compromise NODE_PATH as an env variable, just prepend NODE_PATH=. to the build & run command.

OS specifics

  • Check this very detailed guide if you're on Ubuntu 10 LTS.
  • On Ubuntu 14/13/lower, install the package node-legacy for NodeJS.

Loading sample data

In order for you to see a fully working deployment, you will need some sample data. This can be achieved by either of these approaches:

Clone this wiki locally