Improved documentation.

This commit is contained in:
Antoine Nguyen
2017-12-07 14:09:09 +01:00
parent 3bf3c05213
commit 16720f423b
4 changed files with 48 additions and 22 deletions
-1
View File
@@ -69,7 +69,6 @@ Table of contents
installation
upgrade
rebuild_virtual_env
configuration
moving
rest_api
+2
View File
@@ -1,3 +1,5 @@
.. _modoboa_manual_install:
#######
Modoboa
#######
+41 -21
View File
@@ -1,39 +1,53 @@
############
Rebuild The Virtual Environment
############
Sometimes when upgrading your Operating System (eg from Ubuntu 17.04 to Ubuntu 17.10) your virtual environment running modoboa can get corrupted. Your first response will be to panic but fear not! The solution is in this document.
Sometimes when upgrading your Operating System (eg from Ubuntu 17.04
to Ubuntu 17.10) your virtual environment running modoboa can get
corrupted. Your first response will be to panic but fear not! The
solution is in this document.
First things first:
Recover your database password
============================
You will need to recover your database password (if using mysql or postgresql). You will find this in ``/etc/postfix/sql-aliases.cf`` or any file with ``sql-*.cf`` in the ``/etc/postfix`` directory.
==============================
You will need to recover your database password (if using mysql or
postgresql). You will find this in ``/etc/postfix/sql-aliases.cf`` or
any file with ``sql-*.cf`` in the ``/etc/postfix`` directory.
Make note of this as you will need it when reconfiguring modoboa.
Reinstall Modoboa
================
Start out by backup up your modoboa settings file located in the ``modoboa instance`` directory (for me this was ``/srv/modoboa/instance/instance/settings.py``. This contains your current configuration.
=================
Start out by backup up your modoboa settings file located in the
``modoboa instance`` directory
(``/srv/modoboa/instance/instance/settings.py`` if you used the
default installer configuration). This contains your current
configuration.
Next, you want to remove all current modoboa files.
After doing this, follow the `manual installation instructions **for modoboa only** <http://modoboa.readthedocs.io/en/latest/manual_installation/modoboa.html>`_ as everything should be working properly.
After doing this, follow the manual installation instructions for :ref:`modoboa_manual_install` **only** as everything should be working properly.
After this completes, simply restore your backed up settings file to ``/srv/instance/instance/settings.py``. You will then need to reinstall your extensions (a list can be `found here <http://modoboa.readthedocs.io/en/latest/index.html>`_).
After this completes, simply restore your backed up settings file to
``/srv/instance/instance/settings.py`` (if you used installer default
configuration). You will then need to reinstall your `extensions
<http://modoboa.readthedocs.io/en/latest/index.html>`_.
You can find which plugins you had in your ``settings.py`` file under the **MODOBOA_APPS** variable.
You can find which plugins you had in your ``settings.py`` file under
the ``MODOBOA_APPS`` variable.
Instructions to install extensions can also be `found here <http://modoboa.readthedocs.io/en/latest/installation.html#extensions>`_.
Instructions to install extensions can also be `found here
<http://modoboa.readthedocs.io/en/latest/installation.html#extensions>`_.
Once you have completed this step, you will need to run the following commands:
Once you have completed this step, you will need to run the following
commands:
.. sourcecode:: bash
> (env) $ cd <instance_dir>
> (env) $ python manage.py migrate
> (env) $ python manage.py collectstatic
> (env) $ cd <instance_dir>
> (env) $ python manage.py migrate
> (env) $ python manage.py collectstatic
You will then see a message similar to
You will then see a message similar to:
.. sourcecode:: text
@@ -47,10 +61,16 @@ You will then see a message similar to
Type 'yes' to continue, or 'no' to cancel:
You will want to answer ``yes`` here then simply restart the ``uwsgi`` process with ``service uwsgi restart`` and you should be up and running again.
You will want to answer ``yes`` here then simply restart the ``uwsgi``
process with ``service uwsgi restart`` and you should be up and
running again.
Simply log into your modoboa web panel and verify that your extensions and webmail box is working.
Simply log into your modoboa web panel and verify that your extensions
and webmail box is working.
Information
***********
Rebuild instructions from: `https://help.pythonanywhere.com/pages/RebuildingVirtualenvs/ <https://help.pythonanywhere.com/pages/RebuildingVirtualenvs/>`_
Rebuild instructions from:
`https://help.pythonanywhere.com/pages/RebuildingVirtualenvs/
<https://help.pythonanywhere.com/pages/RebuildingVirtualenvs/>`_
+5
View File
@@ -79,6 +79,11 @@ It is a generic upgrade procedure which will be enough most of the
time but it is generally a good idea to check the associated
documentation.
Rebuild Virtual Environment
***************************
.. include:: rebuild_virtual_env.rst
.. _specific_upgrade_instructions:
Specific instructions