-
Notifications
You must be signed in to change notification settings - Fork 617
Installation
This is a quick reference to get DemocracyOS up and running on your local machine.
- Requirements
-
Install
- [Unix and OS/X](#unix and os/x)
-
Running
- [Running in a production environment](#running in a production environment)
- [OS specifics](#os specifics)
- Load data either through the admin module or by loading fixtures
To get started with DemocracyOS, you will need to have installed:
- MongoDB open-source document database.
- NodeJS & NPM platform.
-
Git distributed version control system. If you're on github and don't have
git, you're doing it wrong. - Make build automation utility.
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.
- Fork or download this repository.
-
cdto the project's location - Based on the
sample.jsoncreate your own configuration (cp config/sample.json config/development.jsonfor default values) - Make sure MongoDB is running and reachable as configured in
config/development.json. - Set the enviroment variable
NODE_PATHwith value:.. - From the root path, run
make. (where is the Makefile)
(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).
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.
- Configure your environment variables for production; specifically, set
NODE_ENVtoproduction - Set your MongoDB instance to run as a service.
- From the project's root path, you need to run:
-
npm installto install node dependencies. -
node ./bin/dos-install && node ./bin/dos-config && node ./bin/dos-build && node index.jsto 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.
- Check this very detailed guide if you're on Ubuntu 10 LTS.
- On Ubuntu 14/13/lower, install the package
node-legacyfor NodeJS.
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:
- Manually load sample fixtures bundled with DemocracyOS.
- Setup and access the administration module.
Visit our official website - Developed by Democracia en Red and contributors from the world over!