diff --git a/conf/supervisord.conf b/conf/supervisord.conf index c1dbd44b..98bb4eb4 100644 --- a/conf/supervisord.conf +++ b/conf/supervisord.conf @@ -1,6 +1,5 @@ [program:budget] -command=/path/to/your/app/venv/bin/gunicorn -c /path/to/your/app/conf/gunicorn.conf.py wsgi:application -directory=/path/to/your/app/ihatemoney/ +command=/path/to/your/app/venv/bin/gunicorn -c /etc/ihatemoney/gunicorn.conf.py ihatemoney.wsgi:application user=www autostart=true autorestart=true diff --git a/docs/contributing.rst b/docs/contributing.rst index 32f3b974..d2bdbcca 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -4,6 +4,52 @@ Contributing Setup a dev environment ======================= +You must develop on top of the git master branch:: + + git clone https://github.com/spiral-project/ihatemoney.git + +Then you need to build your dev environments. Choose your way… + +The quick way +------------- + +If System :ref:`installation-requirements` are fulfilled, you can just issue:: + + make serve + +It will setup a `virtualenv `_, +install dependencies, and run the test server. + +The hard way +------------ + +Alternatively, you can also use the `requirements.txt` file to install the +dependencies yourself. That would be:: + + pip install -r requirements.txt + +And then run the application:: + + cd ihatemoney + python run.py + +Accessing dev server +-------------------- + +In any case, you can point your browser at `http://localhost:5000 `_. +It's as simple as that! + + +Updating +-------- + +In case you want to update to newer versions (from git), you can just run the "update" command:: + + make update + +Useful settings +---------------- + It is better to actually turn the debugging mode on when you're developing. You can create a ``settings.cfg`` file, with the following content:: diff --git a/docs/installation.rst b/docs/installation.rst index 3b8474b7..890ea0fc 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,10 +1,7 @@ Installation ############ -First, you need to get the source files. One way to get them is to download -them from the github repository, using git:: - - git clone https://github.com/spiral-project/ihatemoney.git +.. _installation-requirements: Requirements ============ @@ -13,31 +10,45 @@ Requirements * **Python**: either 2.7, 3.4, 3.5 will work. * **A Backend**: to choose among MySQL, PostgreSQL, SQLite or Memory. +* **Virtualenv** (recommended): `virtualenv` package under Debian/Ubuntu. -We recommend to use `pip `_ and -`virtualenv `_ but it will work -without if you prefer. +We recommend to use `virtualenv `_ but +it will work without if you prefer. -If you have everything installed, you can just issue:: +If wondering about the backend, SQLite is the simplest and will work fine for +most small to medium setups. - make serve +Prepare virtualenv (recommended) +================================ -Alternatively, you can also use the `requirements.txt` file to install the -dependencies yourself (that's what the `make serve` does). That would be:: +Choose an installation path, here `/home/john/ihatemoney`. - pip install -r requirements.txt +Create a virtualenv:: -And then run the application:: + virtualenv -p /usr/bin/python3 /home/john/ihatemoney - cd ihatemoney - python run.py +Activate the virtualenv:: -In any case, you can point your browser at `http://localhost:5000 `_. -It's as simple as that! + source /home/john/ihatemoney/bin/activate -In case you want to update to newer versions, you can just run the "update" command:: +.. note:: You will have to re-issue that ``source`` command if you open a new + terminal. - make update +Install +======= + +Install the latest release with pip:: + + pip install ihatemoney + +Test it +======= + +Once installed, you can start a test server:: + + ihatemoney runserver + +And point your browser at `http://localhost:5000 `_. Deploy it =========