mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
Switch documentation to recomend pip over git
- Update installation instruction - Clearly separate dev setup from installation - Some rewordings/section-ization by the way
This commit is contained in:
parent
a8e3a27993
commit
52d6dd5f90
3 changed files with 77 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -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 <https://pypi.python.org/pypi/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 <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::
|
||||
|
||||
|
|
|
@ -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 <https://pypi.python.org/pypi/pip/>`_ and
|
||||
`virtualenv <https://pypi.python.org/pypi/virtualenv>`_ but it will work
|
||||
without if you prefer.
|
||||
We recommend to use `virtualenv <https://pypi.python.org/pypi/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 <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 <http://localhost:5000>`_.
|
||||
|
||||
Deploy it
|
||||
=========
|
||||
|
|
Loading…
Reference in a new issue