aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlexis Métaireau <alexis@vieuxsinge.com>2018-08-05 14:37:50 +0200
committerAlexis Métaireau <alexis@vieuxsinge.com>2018-08-05 14:37:50 +0200
commit633e3543b24fb241135770afe0ca8bcd8ceae072 (patch)
tree33d5183816de8365efb94645b526b5a052d9e28c /docs
parentc3b973b15e888263f6ca8538a72e39280a77ac3e (diff)
parent08bcf702b86d520b15cd8e9acee3b8df1fe9d07b (diff)
downloadihatemoney-mirror-633e3543b24fb241135770afe0ca8bcd8ceae072.zip
ihatemoney-mirror-633e3543b24fb241135770afe0ca8bcd8ceae072.tar.gz
ihatemoney-mirror-633e3543b24fb241135770afe0ca8bcd8ceae072.tar.bz2
Merge branch 'master' into almet/fix-pbkdf2-check
Diffstat (limited to 'docs')
-rw-r--r--docs/api.rst22
-rw-r--r--docs/installation.rst25
2 files changed, 44 insertions, 3 deletions
diff --git a/docs/api.rst b/docs/api.rst
index b82c6f3..0ae4214 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -164,3 +164,25 @@ And you can of course `DELETE` them at `/api/projects/<id>/bills/<bill-id>`::
$ curl --basic -u demo:demo -X DELETE\
https://ihatemoney.org/api/projects/demo/bills/80\
"OK"
+
+
+Statistics
+----------
+
+You can get some project stats with a `GET` on `/api/projects/<id>/statistics`::
+
+ $ curl --basic -u demo:demo https://ihatemoney.org/api/projects/demo/statistics
+ [
+ {
+ "balance": 12.5,
+ "member": {"activated": True, "id": 1, "name": "alexis", "weight": 1.0},
+ "paid": 25.0,
+ "spent": 12.5
+ },
+ {
+ "balance": -12.5,
+ "member": {"activated": True, "id": 2, "name": "fred", "weight": 1.0},
+ "paid": 0,
+ "spent": 12.5
+ }
+ ]
diff --git a/docs/installation.rst b/docs/installation.rst
index 0c3cfac..4829c5d 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -63,6 +63,22 @@ Once installed, you can start a test server::
And point your browser at `http://localhost:5000 <http://localhost:5000>`_.
+Configure database with MySQL/MariaDB (optional)
+================================================
+
+Only required if you prefer MySQL/MariaDB over SQLite.
+
+1. Install PyMySQL dependencies. On Debian or Ubuntu, that would be::
+
+ apt install python3-dev libssl-dev
+
+2. Install PyMySQL (within your virtualenv)::
+
+ pip install 'PyMySQL>=0.9,<0.10'
+
+3. Create an empty database and a database user
+4. Configure :ref:`SQLALCHEMY_DATABASE_URI <configuration>` accordingly
+
Deploy it
=========
@@ -154,9 +170,12 @@ A volume can also be specified to persist the default database file::
docker run -d -p 8000:8000 -v /host/path/to/database:/database ihatemoney
-The following gunicorn parameters are also available::
+Additional gunicorn parameters can be passed using the docker ``CMD`` parameter.
+For example, use the following command to add more gunicorn workers::
+
+ docker run -d -p 8000:8000 ihatemoney -w 3
- GUNICORN_NUM_WORKERS (default: 3)
+.. _configuration:
Configuration
=============
@@ -186,7 +205,7 @@ Production values are recommended values for use in production.
| | | **Production value:** `ihatemoney conf-example ihatemoney.cfg` sets it to something |
| | | random, which is good. |
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
-| MAIL_DEFAULT_SENDER | ``("Budget manager", | A python tuple describing the name and email address to use when sending |
+| MAIL_DEFAULT_SENDER | ``("Budget manager", | A python tuple describing the name and email address to use when sending |
| | "budget@notmyidea.org")`` | emails. |
| | | |
| | | **Production value:** Any tuple you want. |