aboutsummaryrefslogtreecommitdiff
path: root/docs/upgrade.rst
blob: 702008b48316129cb35f619239aed7b3773c6c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Upgrading
#########

We keep `a ChangeLog
<https://github.com/spiral-project/ihatemoney/blob/master/CHANGELOG.rst>`_. Read
it before upgrading.

Ihatemoney follows `semantic versioning <http://semver.org/>`_. So minor/patch
upgrades can be done blindly.

General procedure
=================

*(sufficient for minor/patch upgrades)*

1. From the virtualenv (if any)::

    pip install -U ihatemoney

2. Restart *supervisor*, or *Apache*, depending on your setup.

You may also want to set new configuration variables (if any). They are
mentioned in the `ChangeLog
<https://github.com/spiral-project/ihatemoney/blob/master/CHANGELOG.rst>`_, but
this is **not required for minor/patch upgrades**, a safe default will be used
automatically.

Version-specific instructions
=============================

*(must read for major upgrades)*

When upgrading from a major version to another, you **must** follow special
instructions:

1.x → 2.x
---------

Switch from git installation to pip installation
++++++++++++++++++++++++++++++++++++++++++++++++

The recommended installation method is now using *pip*. Git is now intended for
development only.

.. warning:: Be extra careful to not remove your sqlite database nor your
             settings file, if they are stored inside the cloned folder.

1. Delete the cloned folder


.. note:: If you are using a virtualenv, then the following commands should be run inside it (see
          :ref:`virtualenv-preparation`).


2. Install ihatemoney with pip::

    pip install ihatemoney

3. Fix your configuration file (paths *have* changed), depending on the software you use in your setup:

   - **gunicorn**: ``ihatemoney generate-config gunicorn.conf.py`` (nothing
     critical changed, keeping your old config might be fine)

   - **supervisor** : ``ihatemoney generate-config supervisord.conf`` (mind the
     ``command=`` line)

   - **apache**: ``ihatemoney generate-config apache-vhost.conf`` (mind the
     ``WSGIDaemonProcess``, ``WSGIScriptAlias`` and ``Alias`` lines)
4. Restart *Apache* or *Supervisor*, depending on your setup.

Upgrade ADMIN_PASSWORD to its hashed form
++++++++++++++++++++++++++++++++++++++++++

.. note:: Not required if you are not using the ADMIN_PASSWORD feature.

``ihatemoney generate_password_hash`` will do the hashing job for you, just put
 its result in the ``ADMIN_PASSWORD`` var from your `ihatemoney.cfg` and
 restart *apache* or the *supervisor* job.