Official method for production deployment

586 views
Skip to first unread message

Roberto Rosario

unread,
Oct 21, 2015, 7:24:14 PM10/21/15
to Mayan EDMS
As promised this is the officially recommended way to do a simple production deployment. A setup like this should scale to several hundred thousand documents and 2 to 3 concurrent users. This setup should cover most people wanting to use Mayan EDMS for personal and home office use, any more than that I recommend you seek consulting/support for your use case.

http://mayan.readthedocs.org/en/development/topics/deploying.html

Mathias Behrle

unread,
Oct 22, 2015, 5:40:11 AM10/22/15
to mayan...@googlegroups.com
* Roberto Rosario: " [Mayan EDMS: 1136] Official method for production
deployment" (Wed, 21 Oct 2015 16:24:13 -0700 (PDT)):
Great document merging in contrib files! Will test and review those next days.

After the deletion of the contribs section I am still a little bit in doubt
where information about alternative setups should be put? There are for sure
people using apache, rabbitmq, ... Any thoughts?

--

Mathias Behrle
PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6

Brent Meisenheimer

unread,
Oct 22, 2015, 2:00:32 PM10/22/15
to Mayan EDMS
I'm attempting to follow the deployment instructions on a Ubuntu 14.04 Amazon EC2 instance.

It works well until I get to the following step:


Create an initial settings file:

mayan-edms.py createsettings
When I enter this command I receive the following error:

Unknown command: 'createsettings'
Type 'mayan-edms.py help' for usage.

Any ideas?

Roberto Rosario

unread,
Oct 22, 2015, 2:06:12 PM10/22/15
to Mayan EDMS
Hi Mathias,

The contrib section will be kept, I just removed outdated sample configuration files ie: Apache using mod_python (mod-proxy-uwsgi is a better choice).

I will add new contrib files based in this new deployment document to help those building containers or deploying straight from a Git clone.

I agree, it can be improved in a lot of ways and RabbitMQ is much better, that is why I emphasize that this is a minimal and quick production deploy, is not recommended for enterprise or work-groups of more than 2-3 users. The idea in including this chapter is to allow for production deployments (not leaving users in the dark about ./manage runserver vs. NGINX), but for anything else bigger I still recommend users to get paid professional consulting.

Roberto Rosario

unread,
Oct 22, 2015, 2:09:53 PM10/22/15
to Mayan EDMS
The chapter is meant for the final release, the command was added after the release of beta 2 (https://gitlab.com/mayan-edms/mayan-edms/commit/9bb3cb45957bf1c7959399063ee308d566e6f2ae). Use a Git clone to test the new command for now.

Philippe Verbeke

unread,
Dec 16, 2015, 4:46:26 PM12/16/15
to Mayan EDMS
I was able to install successfully Mayan-EDMS 2.0.0 under Ubuntu Server 15.10 following this method and adding one step before the creation of the supervisor file for the uWSGI process:

- Create the /usr/share/mayan-edms/uwsgi.ini file:

    [uwsgi]
    chdir = /usr/share/mayan-edms/lib/python2.7/site-packages/mayan
    chmod-socket = 664
    chown-socket = www-data:www-data
    env = DJANGO_SETTINGS_MODULE=mayan.settings.production
    gid = root
    logto = /var/log/uwsgi/%n.log
    pythonpath = /usr/share/mayan-edms/lib/python2.7/site-packages
    master = True
    max-requests = 5000
    socket = /usr/share/mayan-edms/uwsgi.sock
    uid = root
    vacuum = True
    wsgi-file = /usr/share/mayan-edms/lib/python2.7/site-packages/mayan/wsgi.py

Great project. Thank you very much for sharing it.

Philippe Verbeke

Roberto Rosario

unread,
Dec 16, 2015, 5:49:11 PM12/16/15
to Mayan EDMS
Hi,

The uWSGI ini file is indeed missing from the instructions, thanks for finding this, will add to the docs ASAP.
Thanks for installing it, feel free to post feedback or open tickets for any issue you find.

Thanks,
--Roberto

Jonathon Exley

unread,
Dec 17, 2015, 5:42:08 AM12/17/15
to mayan...@googlegroups.com

I just did the same thing!
A couple of other minor tweaks:
* The logging directory /var/log/uwsgi also needs to be created.
* There is a missing "s" in /etc/nginx/site-available/mayan, it should be /etc/nginx/sites-available/mayan

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roberto Rosario

unread,
Dec 18, 2015, 3:09:53 AM12/18/15
to Mayan EDMS
Deployment documentation fixed (http://mayan.readthedocs.org/en/v2.0.0/topics/deploying.html) thanks to Philippe Verbeke's and Jonathon's help.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+unsubscribe@googlegroups.com.

rist...@gusl.org.ve

unread,
Dec 22, 2015, 9:37:28 AM12/22/15
to Mayan EDMS
Hi, what is the best way to debug install? I followed deploy doc with any error but the files dont appear when upload.

Thanks.

Roberto Rosario

unread,
Dec 24, 2015, 4:15:55 AM12/24/15
to Mayan EDMS
In the file settings/production.py change the DEBUG flag from False to True. Restart supervisor with /etc/init.d/supervisor stop && sleep 30 && /etc/init.d/supervisor start and watch the console for messages. Copy and paste (or screenshot) any errors here.

Devendranath S.V. Sadhanaa

unread,
Dec 28, 2015, 12:53:24 AM12/28/15
to Mayan EDMS
Hello!

Thanks for the deployment document.

I am new to django framework & deployments.
Is the Docker/Docker Compose part required for normal/production deployment?

Thanks.

- dEven.

Roberto Rosario

unread,
Dec 28, 2015, 12:57:21 AM12/28/15
to Mayan EDMS
Hi!

Thanks for trying out Mayan EDMS. No, the Docker/Docker Compose instructions are for an alternative deployment method that doesn't require installing Mayan EDMS on the OS but instead runs it inside a container, which is a sorts of lightweight virtualization.

rist...@gusl.org.ve

unread,
Dec 28, 2015, 10:30:14 PM12/28/15
to Mayan EDMS
Hi again, thanks for the help was a permission problem[1], so i chown folder for www-data to write files and now the system works :)

[1] "[Errno 13] Permission denied: '/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/media/document_storage/"

Roberto Rosario

unread,
Dec 28, 2015, 10:37:26 PM12/28/15
to mayan...@googlegroups.com
Perfect! Don't forget to set the DEBUG flag back to False because Celery (the background task manager) won't work correctly in DEBUG mode.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+...@googlegroups.com.

d.sim...@enterteam.it

unread,
Jan 15, 2016, 7:48:44 AM1/15/16
to Mayan EDMS
Is it possible to deploy mayan in a subdirectory? e.g. on http://mysite.com/mayan

Daniele

Roberto Rosario

unread,
Jan 16, 2016, 2:27:55 AM1/16/16
to mayan...@googlegroups.com
Not at the moment. Most of the work to support this is done, only this ticket remains: https://gitlab.com/mayan-edms/mayan-edms/issues/206

This is the last place that static and not dynamic URLs are specified.

--

d.sim...@enterteam.it

unread,
Jan 18, 2016, 3:34:07 AM1/18/16
to Mayan EDMS
I see, if that's the only blocker I can work it around by hardcoding my changes to base.py.
Can you help me figure out what other settings should I edit in order to install mayan into a /mayan subdir?

thanks!

Roberto Rosario

unread,
Jan 29, 2016, 4:55:21 PM1/29/16
to Mayan EDMS
I've never deployed it this way so I really can't point you to a specific place to edit to make it work. I've added this as part of the tickets for version 2.1 to help push this along.
Reply all
Reply to author
Forward
0 new messages