Merge branch 'master' into feature/sane_source
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -3,7 +3,8 @@ Advanced deployment
|
||||
===================
|
||||
|
||||
Mayan EDMS should be deployed like any other Django_ project and
|
||||
preferably using virtualenv_.
|
||||
preferably using virtualenv_. Below are some ways to deploy and use Mayan EDMS.
|
||||
Do not use more than one method.
|
||||
|
||||
Being a Django_ and a Python_ project, familiarity with these technologies is
|
||||
recommended to better understand why Mayan EDMS does some of the things it
|
||||
@@ -58,7 +59,7 @@ to /usr/bin/ with ...
|
||||
|
||||
sudo ln -s /opt/local/bin/tesseract /usr/bin/tesseract
|
||||
|
||||
... alternatively set the paths in the ``settings/locals.py``
|
||||
Alternatively, set the paths in the ``settings/locals.py``
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -76,9 +77,9 @@ With Homebrew installed run the command:
|
||||
Set the Binary paths
|
||||
********************
|
||||
|
||||
Mayan EDMS by default will look in /usr/bin/ for the binary files it needs
|
||||
so either you can symlink the binaries installed via brew in /usr/local/bin/
|
||||
to /usr/bin/ with ...
|
||||
Mayan EDMS by default will look in /usr/bin/ for the binary files it needs.
|
||||
You can symlink the binaries installed via brew in /usr/local/bin/
|
||||
to /usr/bin/ with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -87,7 +88,7 @@ to /usr/bin/ with ...
|
||||
sudo ln -s /usr/local/bin/pdftotext /usr/bin/pdftotext && \
|
||||
sudo ln -s /usr/local/bin/gs /usr/bin/gs
|
||||
|
||||
... alternatively set the paths in the ``settings/locals.py``
|
||||
Alternatively, set the paths in the ``settings/locals.py``
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -265,15 +266,18 @@ Make the installation directory readable and writable by the webserver user::
|
||||
|
||||
chown www-data:www-data /usr/share/mayan-edms -R
|
||||
|
||||
Restart the services::
|
||||
Enable and restart the services [1_]::
|
||||
|
||||
systemctl enable supervisor
|
||||
systemctl restart supervisor
|
||||
systemctl restart nginx
|
||||
|
||||
[1]: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
|
||||
|
||||
.. _Debian: http://www.debian.org/
|
||||
.. _Django: http://www.djangoproject.com/
|
||||
.. _Python: http://www.python.org/
|
||||
.. _SQLite: https://www.sqlite.org/
|
||||
.. _Ubuntu: http://www.ubuntu.com/
|
||||
.. _virtualenv: http://www.virtualenv.org/en/latest/index.html
|
||||
.. _1: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
|
||||
|
||||
@@ -16,8 +16,8 @@ request on GitLab_.
|
||||
Project philosophies
|
||||
--------------------
|
||||
|
||||
How to think about Mayan EDMS when doing changes or adding new features,
|
||||
why things are the way they are in Mayan EDMS.
|
||||
How to think about Mayan EDMS when doing changes or adding new features;
|
||||
why things are the way they are in Mayan EDMS:
|
||||
|
||||
- Functionality must be as market/sector independent as possible, code for the
|
||||
95% of use cases.
|
||||
@@ -36,7 +36,7 @@ why things are the way they are in Mayan EDMS.
|
||||
not viable/mature/efficient.
|
||||
- Each app is as independent and self contained as possible. Exceptions, the
|
||||
basic requirements: navigation, permissions, common, main.
|
||||
- If an app is meant to be used by more than one other app it should be as
|
||||
- If an app is meant to be used by more than one other app, it should be as
|
||||
generic as possible in regard to the project and another app will bridge the functionality.
|
||||
|
||||
- Example: since indexing (document_indexing) only applies to documents, the
|
||||
@@ -48,7 +48,7 @@ Coding conventions
|
||||
|
||||
Follow PEP8
|
||||
~~~~~~~~~~~
|
||||
Whenever possible, but don't obsess over things like line length.
|
||||
Whenever possible, but don't obsess over things like line length:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -103,9 +103,9 @@ Example:
|
||||
)
|
||||
from .models import Index, IndexInstanceNode, DocumentRenameCount
|
||||
|
||||
All local app module imports are in relative form, local app module name is to
|
||||
All local app module imports are in relative form. Local app module name is to
|
||||
be referenced as little as possible, unless required by a specific feature,
|
||||
trick, restriction, ie: Runtime modification of the module's attributes.
|
||||
trick, restriction (e.g., Runtime modification of the module's attributes).
|
||||
|
||||
Incorrect:
|
||||
|
||||
@@ -128,7 +128,7 @@ Dependencies
|
||||
Mayan EDMS apps follow a hierarchical model of dependency. Apps import from
|
||||
their parents or siblings, never from their children. Think plugins. A parent
|
||||
app must never assume anything about a possible existing child app. The
|
||||
documents app and the Document model are the basic entities they must never
|
||||
documents app and the Document model are the basic entities; they must never
|
||||
import anything else. The common and main apps are the base apps.
|
||||
|
||||
|
||||
@@ -423,3 +423,16 @@ Wheel package
|
||||
$ pip install <path of the Git repository>/dist/mayan_edms-x.y.z-py2-none-any.whl
|
||||
$ mayan-edms.py initialsetup
|
||||
$ mayan-edms.py runserver
|
||||
|
||||
|
||||
Version numbering
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Mayan EDMS uses the Semantic Versioning (http://semver.org/) method to choose
|
||||
version numbers along with Python's PEP-0440 (https://www.python.org/dev/peps/pep-0440/)
|
||||
to format them.
|
||||
|
||||
X.YaN # Alpha release
|
||||
X.YbN # Beta release
|
||||
X.YrcN # Release Candidate
|
||||
X.Y # Final release
|
||||
|
||||
@@ -126,3 +126,10 @@ dependent support Python 3 then will the project move to fully support Python 3.
|
||||
|
||||
Make sure that the Celery BEAT scheduler is running correctly as it is the element
|
||||
that triggers the periodics tasks.
|
||||
|
||||
**Q: How to do LDAP authentication**
|
||||
|
||||
A sample settings file called ldap_connection_settings.py is included in the
|
||||
contrib/settings/ folder of the repository showing how to setup LDAP
|
||||
authentication.
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Features
|
||||
* Dynamic default values for metadata.
|
||||
|
||||
* Metadata fields can have an initial value, which can be static or determined
|
||||
by an user provided template code snippet.
|
||||
by a template code snippet provided by the user.
|
||||
|
||||
* Documents can be uploaded from different sources.
|
||||
|
||||
@@ -68,7 +68,7 @@ Features
|
||||
|
||||
* Multi page document support.
|
||||
|
||||
* Multiple page PDFs and TIFFs files are supported.
|
||||
* Multiple page PDF and TIFF files are supported.
|
||||
|
||||
* Automatic OCR processing.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Installation
|
||||
============
|
||||
|
||||
The easiest way to use Mayan EDMS is by using the official Docker_ image.
|
||||
Make sure Docker_ is properly installed and working before attempting to install
|
||||
Make sure Docker is properly installed and working before attempting to install
|
||||
Mayan EDMS.
|
||||
|
||||
With Docker properly installed, proceed to download the Mayan EDMS image using
|
||||
@@ -10,102 +10,25 @@ the command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull mayanedms/mayanedms
|
||||
$ docker pull mayanedms/mayanedms:2.3
|
||||
|
||||
After the image finishes downloading, initialize a Mayan EDMS container.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run --rm -v mayan_media:/var/lib/mayan \
|
||||
-v mayan_settings:/etc/mayan mayanedms/mayanedms mayan:init
|
||||
$ docker run -d --name mayan-edms --restart=always -p 80:80 \
|
||||
-v mayan_data:/var/lib/mayan mayanedms/mayanedms:2.3
|
||||
|
||||
With initialization complete, launch the container. If another web server is
|
||||
running on port 80 use a different port in the -p option, ie: -p 81:80.
|
||||
Point your browser to the IP address 127.0.0.1 (or the alternate port chosen,
|
||||
ie: 127.0.0.1:81) and use the automatically created admin account.
|
||||
|
||||
.. code-block:: bash
|
||||
All files will be stored in the Docker volume ``mayan_data``
|
||||
|
||||
docker run -d --name mayan-edms --restart=always -p 80:80 \
|
||||
-v mayan_media:/var/lib/mayan -v mayan_settings:/etc/mayan \
|
||||
mayanedms/mayanedms
|
||||
|
||||
Point your browser to 127.0.0.1 (or the alternate port chosen, ie: 127.0.0.1:81)
|
||||
and use the automatically created admin account.
|
||||
|
||||
All files will be stored in the following two volumes:
|
||||
|
||||
- mayan_media
|
||||
- mayan_settings
|
||||
|
||||
Stopping and starting
|
||||
---------------------
|
||||
To stop the container use::
|
||||
|
||||
docker stop mayan-edms
|
||||
|
||||
To start the container again::
|
||||
|
||||
docker start mayan-edms
|
||||
|
||||
Configuring
|
||||
-----------
|
||||
To edit the settings file, check the physical location of the `mayan_settings`
|
||||
volume using::
|
||||
|
||||
docker volume inspect mayan_settings
|
||||
|
||||
Which should produce an output similar to this one:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "mayan_settings",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "/var/lib/docker/volumes/mayan_settings/_data",
|
||||
"Labels": null,
|
||||
"Scope": "local"
|
||||
}
|
||||
]
|
||||
|
||||
In this case the physical location of the `mayan_settings` volume is
|
||||
`/var/lib/docker/volumes/mayan_settings/_data`. Edit the settings file with your
|
||||
favorite editor::
|
||||
|
||||
sudo vi /var/lib/docker/volumes/mayan_settings/_data/local.py
|
||||
|
||||
Backups
|
||||
-------
|
||||
|
||||
To backup the existing data, check the physical location of the `mayan_media`
|
||||
volume using::
|
||||
|
||||
docker volume inspect mayan_media
|
||||
|
||||
Which should produce an output similar to this one:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "mayan_settings",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "/var/lib/docker/volumes/mayan_media/_data",
|
||||
"Labels": null,
|
||||
"Scope": "local"
|
||||
}
|
||||
]
|
||||
|
||||
Only the `db.sqlite3` file and the `document_storage` folder need to be backed
|
||||
up::
|
||||
|
||||
sudo tar -zcvf backup.tar.gz /var/lib/docker/volumes/mayan_media/_data/document_storage /var/lib/docker/volumes/mayan_media/_data/db.sqlite3
|
||||
sudo chown `whoami` backup.tar.gz
|
||||
|
||||
Restore
|
||||
-------
|
||||
Uncompress the archive in the original docker volume using::
|
||||
|
||||
sudo tar -xvzf backup.tar.gz -C /
|
||||
If another web server is running on port 80 use a different port in the ``-p``
|
||||
option, ie: ``-p 81:80``.
|
||||
|
||||
For the complete set of installation, configuration, upgrade, and backup
|
||||
instructions visit the Mayan EDMS Docker Hub page at:
|
||||
https://hub.docker.com/r/mayanedms/mayanedms/
|
||||
|
||||
.. _Docker: https://www.docker.com/
|
||||
|
||||
@@ -2,21 +2,20 @@
|
||||
Transformations
|
||||
===============
|
||||
|
||||
Transformation are persistent manipulations to the previews of the stored
|
||||
documents. For example: a scanning equipment may only produce landscape PDFs.
|
||||
In this case an useful transformation for that document source would be to
|
||||
rotate all documents scanned by 270 degrees after being uploaded, this way
|
||||
whenever a document is uploaded from that scanner it will appear in portrait
|
||||
orientation. In this case add a this transformation to the Mayan EDMS source
|
||||
that is connected to that device this way all pages scanned via that source
|
||||
with inherit the transformation as they are created.
|
||||
Transformations are persistent manipulations to the previews of the stored
|
||||
documents. For example: a scanning equipment may only produce landscape PDFs.
|
||||
In this case a useful transformation for that document source would be to rotate
|
||||
all scanned documents by 270 degrees after being uploaded. By adding this
|
||||
transformation to the Mayan EDMS source that is connected to the scanner, all
|
||||
pages scanned via that source will inherit the transformation as they are
|
||||
created. The result is that whenever a document is uploaded from that scanner,
|
||||
it will appear in portrait orientation, instead of landscape orientation.
|
||||
|
||||
Transformations can also be added to existing documents, by clicking on a
|
||||
document's page, then clicking on "transformations". In this view the Actions
|
||||
menu will have a new option that reads "Create new transformation". At the
|
||||
moment the rotation, zoom, crop, and resize transformations are available.
|
||||
Once the document image has been corrected resubmit it for OCR for improved
|
||||
results.
|
||||
Transformations can also be added to existing documents by clicking on a
|
||||
document's page and then clicking on "transformations". In this view the Actions
|
||||
menu will have a new option that reads "Create new transformation". Currently,
|
||||
the available transformations are: rotation, zoom, crop, and resize. Once the
|
||||
document image has been corrected, resubmit it for OCR for improved results.
|
||||
|
||||
Transformations are not destructive and do not physically modify the document
|
||||
Transformations are not destructive and do not physically modify the document
|
||||
file, they just modify the document's graphical representation.
|
||||
|
||||
Reference in New Issue
Block a user