Document update. Add new deployment chapter.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
=========
|
||||
Deploying
|
||||
=========
|
||||
|
||||
Like other Django based projects **Mayan EDMS** can be deployed in a wide variety
|
||||
of ways. The method provided below is only provided as a bare minimum example.
|
||||
These instructions asume you installed **Mayan EDMS** as mentioned in the
|
||||
Installation chapter.
|
||||
|
||||
Install the system dependencies:
|
||||
|
||||
sudo apt-get install nginx supervisor redis-server
|
||||
|
||||
Switch and activate the `virtualenv` where you installed **Mayan EDMS**. Install
|
||||
the Python client for redis:
|
||||
|
||||
pip install redis
|
||||
|
||||
Install the Python application server gunicorn:
|
||||
|
||||
pip install gunicorn
|
||||
|
||||
Update the settings/local.py file:
|
||||
|
||||
BROKER_URL = 'redis://127.0.0.1:6379/0'
|
||||
CELERY_ALWAYS_EAGER = False
|
||||
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
|
||||
|
||||
+15
-18
@@ -6,11 +6,11 @@ Development
|
||||
**Mayan EDMS** is under active development, and contributions are welcome.
|
||||
|
||||
If you have a feature request, suggestion or bug report, please open a new
|
||||
issue on the `GitHub issue tracker`_. To submit patches, please send a pull
|
||||
request on GitHub_. Make sure to add yourself to the :ref:`contributors` file.
|
||||
issue on the `GitLab issue tracker`_. To submit patches, please send a pull
|
||||
request on GitLab_. Make sure to add yourself to the :ref:`contributors` file.
|
||||
|
||||
.. _GitHub: https://github.com/mayan-edms/mayan-edms/
|
||||
.. _`GitHub issue tracker`: https://github.com/mayan-edms/mayan-edms/issues
|
||||
.. _GitLab: https://gitlab.com/mayan-edms/mayan-edms/
|
||||
.. _`GitLab issue tracker`: https://gitlab.com/mayan-edms/mayan-edms/issues
|
||||
|
||||
|
||||
Project philosophies
|
||||
@@ -286,9 +286,9 @@ Source Control
|
||||
|
||||
**Mayan EDMS** source is controlled with Git_.
|
||||
|
||||
The project is publicly accessible, hosted and can be cloned from **GitHub** using::
|
||||
The project is publicly accessible, hosted and can be cloned from **GitLab** using::
|
||||
|
||||
$ git clone git://github.com/mayan-edms/mayan-edms.git
|
||||
$ git clone git://gitlab.com/mayan-edms/mayan-edms.git
|
||||
|
||||
|
||||
Git branch structure
|
||||
@@ -306,21 +306,20 @@ Git branch structure
|
||||
Released versions.
|
||||
|
||||
|
||||
Each release is tagged and available for download on the Downloads_ section of the **Mayan EDMS** repository on GitHub_.
|
||||
Each release is tagged separately.
|
||||
|
||||
When submitting patches, please place your code in its own ``feature/`` branch prior to opening a pull request on GitHub_.
|
||||
When submitting patches, please place your code in its own ``feature/`` branch prior to opening a Merge Request on GitLab_.
|
||||
|
||||
.. _Git: http://git-scm.org
|
||||
.. _`Successful Git Branching Model`: http://nvie.com/posts/a-successful-git-branching-model/
|
||||
.. _git-flow: https://github.com/nvie/gitflow
|
||||
.. _Downloads: https://github.com/mayan-edms/mayan-edms/archives/master
|
||||
|
||||
|
||||
Steps to deploy a development version
|
||||
-------------------------------------
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone https://github.com/mayan-edms/mayan-edms.git
|
||||
$ git clone https://gitlab.com/mayan-edms/mayan-edms.git
|
||||
$ cd mayan-edms
|
||||
$ git checkout development
|
||||
$ virtualenv venv
|
||||
@@ -372,14 +371,12 @@ Then on a separate console launch a celery worker from the same provisioned Vagr
|
||||
|
||||
Contributing changes
|
||||
--------------------
|
||||
Once your have created and committed some new code or feature, submit a Pull Request.
|
||||
Be sure to merge with mayan-edms/development before doing a pull request so that patches
|
||||
apply as cleanly as possible. If there are no conflicts, Pull Requests can be merged
|
||||
directly from Github otherwise a manual command line merge has to be done and
|
||||
your patches might take longer to get merged.
|
||||
|
||||
For more information on how to create Pull Request read: https://help.github.com/articles/using-pull-requests
|
||||
or the quick version: https://help.github.com/articles/creating-a-pull-request
|
||||
Once your have created and committed some new code or feature, submit a Pull
|
||||
Request. Be sure to merge with the development branch before doing a Pull
|
||||
Request so that patches apply as cleanly as possible. If there are no conflicts,
|
||||
Merge Requests can be merged directly from the website UI otherwise a manual
|
||||
command line merge has to be done and your patches might take longer to get
|
||||
merged.
|
||||
|
||||
|
||||
Debugging
|
||||
|
||||
@@ -26,7 +26,8 @@ Initialize a ``virtualenv`` to deploy the project:
|
||||
$ pip install mayan-edms
|
||||
|
||||
By default **Mayan EDMS** will create a single file SQLite_ database, which makes
|
||||
it very easy to start using **Mayan EDMS**. Populate the database with the project's schema doing:
|
||||
it very easy to start using **Mayan EDMS**. Populate the database with the
|
||||
project's schema doing:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -34,13 +35,15 @@ it very easy to start using **Mayan EDMS**. Populate the database with the proje
|
||||
$ mayan-edms.py runserver
|
||||
|
||||
Point your browser to http://127.0.0.1:8000. If everything was installed
|
||||
correctly you should see the login screen and panel showing a randomly generated admin password.
|
||||
correctly you should see the login screen and panel showing a randomly generated
|
||||
admin password.
|
||||
|
||||
Mac OSX
|
||||
-------
|
||||
|
||||
**Mayan EDMS** is dependant on a number of binary packages and the recommended way is
|
||||
to use a package manager such as `MacPorts <https://www.macports.org/>`_ or `Homebrew <http://brew.sh/>`.
|
||||
**Mayan EDMS** is dependant on a number of binary packages and the recommended
|
||||
way is to use a package manager such as `MacPorts <https://www.macports.org/>`_
|
||||
or `Homebrew <http://brew.sh/>`.
|
||||
|
||||
|
||||
Use MacPorts to install binary dependencies
|
||||
@@ -52,13 +55,6 @@ With MacPorts installed run the command:
|
||||
|
||||
sudo port install python-dev gcc tesseract-ocr unpaper python-virtualenv ghostscript libjpeg-dev libpng-dev poppler-utils
|
||||
|
||||
**Mayan EDMS** can use either Pillow, ImageMagick or GraphicsMagick as the backend to
|
||||
convert images so in addition you can install GraphicsMagick ...
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port install graphicsmagick
|
||||
|
||||
Set the Binary paths
|
||||
********************
|
||||
|
||||
@@ -68,19 +64,12 @@ to /usr/bin/ with ...
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo ln -s /opt/local/bin/tesseract /usr/bin/tesseract && \
|
||||
sudo ln -s /opt/local/bin/identify /usr/bin/identify && \
|
||||
sudo ln -s /opt/local/bin/gs /usr/bin/gs
|
||||
sudo ln -s /opt/local/bin/tesseract /usr/bin/tesseract
|
||||
|
||||
... alternatively set the paths in the ``settings/locals.py``
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# document converters
|
||||
CONVERTER_IM_CONVERT_PATH = '/opt/local/bin/convert'
|
||||
IM_IDENTIFY_PATH = '/opt/local/bin/identify'
|
||||
GRAPHICS_BACKEND = 'converter.backends.graphicsmagick.GraphicsMagick'
|
||||
GM_PATH = '/opt/local/bin/gm'
|
||||
LIBREOFFICE_PATH = '/Applications/LibreOffice.app/Contents/MacOS/soffice'
|
||||
|
||||
Or Use Homebrew
|
||||
@@ -90,7 +79,7 @@ With Homebrew installed run the command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
brew install python gcc tesseract unpaper poppler libpng graphicsmagick postgresql
|
||||
brew install python gcc tesseract unpaper poppler libpng postgresql
|
||||
|
||||
Set the Binary paths
|
||||
********************
|
||||
@@ -102,20 +91,14 @@ to /usr/bin/ with ...
|
||||
.. code-block:: bash
|
||||
|
||||
sudo ln -s /usr/local/bin/tesseract /usr/bin/tesseract && \
|
||||
sudo ln -s /usr/local/bin/identify /usr/bin/identify && \
|
||||
sudo ln -s /usr/local/bin/unpaper /usr/bin/unpaper && \
|
||||
sudo ln -s /usr/local/bin/pdftotext /usr/bin/pdftotext && \
|
||||
sudo ln -s /usr/local/bin/gs /usr/bin/gs && \
|
||||
sudo ln -s /usr/local/bin/gs /usr/bin/gs
|
||||
|
||||
... alternatively set the paths in the ``settings/locals.py``
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# document converters
|
||||
CONVERTER_IM_CONVERT_PATH = '/usr/local/bin/convert'
|
||||
IM_IDENTIFY_PATH = '/usr/local/bin/identify'
|
||||
GRAPHICS_BACKEND = 'converter.backends.graphicsmagick.GraphicsMagick'
|
||||
GM_PATH = '/usr/local/bin/gm'
|
||||
LIBREOFFICE_PATH = '/Applications/LibreOffice.app/Contents/MacOS/soffice'
|
||||
|
||||
Testing the install
|
||||
@@ -145,6 +128,8 @@ After making sure everything is running correctly, stop the `runserver` command.
|
||||
Deploy **Mayan EDMS** using the webserver of your preference. For more information
|
||||
on deployment instructions and examples, checkout Django's official documentation
|
||||
on the topic https://docs.djangoproject.com/en/1.6/howto/deployment/
|
||||
For a simple production deployment setup follow the instructions in the
|
||||
Deploying chapter <topics/deploying>
|
||||
|
||||
|
||||
Other database managers
|
||||
|
||||
Reference in New Issue
Block a user