We have a project which will eventually store over 80 million documents.
One of our main concerns were that Mayan stores all its documents in the same directory. We prefer that the documents are stored in a sharded system. I eventually found a django project to help out; django-caster.
https://github.com/zacharyvoase/django-castor
Unfortunately, django-caster was last updated in 2015. As such, 2 small modifications need to be done for it to work with Python 3.8.
Here's the how to for Direct Installs. Docker installations will have to vary the procedure to match.
1. Activate your virtual environment for Mayan and install django-castor:
Code: Select all
source /opt/mayan-edms/bin/activate
Code: Select all
pip install django-castor==0.2.1
djcaster/storage.py:
change line 80 to the following:
Code: Select all
def get_available_name(name, max_length=None):
change line 78 to the following:
Code: Select all
for i in range(depth):
Open config.yml in your mayan media directory.
Set the DOCUMENTS_STORAGE_BACKEND setting to the following:
Code: Select all
DOCUMENTS_STORAGE_BACKEND: djcastor.storage.CAStorage