RSR_Dev RSR_V3 - adriancollier/demo GitHub Wiki

Get started

Clone the repo:

$ cd <where you want to repo>
$ git clone [email protected]:akvo/akvo-rsr.git
$ git checkout -b feature/rsr_v3 origin/feature/rsr_v3

Run locally

To be able to run Akvo RSR locally vagrant is used, see doc.

Develop with the tool chain setup

If the tool chain have not been setup scroll down
If we have the tool chain setup all we need to do is to have two terminals open in scripts/devhelpers and the first for running the devserver:

$ ./supervisorctl.sh stop rsr_reload && ./supervisorctl.sh stop rsr && ./manage.sh runserver

And in the second to compile assets on the fly:

$ gulp watch

Setup for local development

Once we have RSR running we want to start contributing. As the vagrant FAQ said, for local development best is to run Djangos development web server. First make sure we got a local config. From the repo root:

$ cp akvo/settings/66_local.template akvo/settings/66_local.conf

Then head to the devhelpers directory and switch from Gunicorn webserver to the Django web server

$ cd scripts/devhelpers
$ ./supervisorctl.sh stop rsr_reload && ./supervisorctl.sh stop rsr
$ ./manage.sh runserver

To have .scss & .jsx files compiled on save we use a node.js application called gulp.js. So from an other terminal, make sure we got node installed:

$ brew install node
$ node -v
$ npm -v

If node & npm returned successfully we want to install gulp

$ npm install gulp -g

Let's initiate the gulp dependences, so in scripts/devhelpers do:

$ npm install

We can now use gulp to watch for changes:

$ gulp watch

From now on we can only do the two steps described in the previous section to develop.

⚠️ **GitHub.com Fallback** ⚠️