Page 1 of 1

Mayan EDMS local development workflow.

Posted: Thu Aug 20, 2020 7:24 am
by Jack
Hello folks,

I've been using Mayan EDMS for some time now. The system is really cool.
I have a bit of a noob question about the Mayan EDMS development workflow. Let me clarify a little bit..

I am new into the python, django scene coming from different programming background.
I would like to make some changes to the Mayan EDMS and I am stuck at how to do it correctly..

Let's say I check out the repo and build a local docker image. Spin it up. Then what?
What would be the correct way to check out some local code changes without rebuilding the whole image? A docker volume?

I was hoping that maybe some of you could share your local development workflows.
Please forgive if this is a bit offtopic and not strictly about the system. :)

Thanks!

P.S. I did read the docs.
P.S.S. I have Windows 10 with WSL2 enabled as my current dev env.

Re: Mayan EDMS local development workflow.

Posted: Tue Aug 25, 2020 10:11 am
by Jack
The thing that I can't seem to figure out is how to correctly expose the code inside the container.
Using docker volumes or binds on mayan dir results ir gunicorn worker error.

If someone could recommend how to make local changes to the code correctly that would be grand. ;)

Re: Mayan EDMS local development workflow.

Posted: Thu Sep 10, 2020 6:53 am
by michael
As you've seen we push several technologies beyond their usual expected usage. If you are new to Python and Django I suggest you test out your changes using the local runserver first.

The code repository has a Make file with all the targets your need. You can call make and it will show most targets with a small help text.

To launch a local HTTP server for testing use: make runsever
For a local shell environment: make shell_plus
To build a Docker image: make docker-build
To build a Docker image with an APT proxy: make docker-build-with-proxy
You can set your entire development environment with: make setup-dev-environment

Make sure you deploy this inside a Python 3 virtualenv to isolate the development environment from the rest of the system.