Mayan-edms changes with docker volumes

Hello, I am new to Mayan and docker, I have been playing around with mayan locally (download de source code directly) and been doing good as I am familiar with django…
However, now I want to use the docker, I have it running already.
But I am not sure how to arrange the volumes from the docker-compose.yml in order to be able to have mayan-edms locally (in order to make changes), and have the docker point to that mayan in orden to apply the changes
I would love some help with this, or if there is another recommended method to apply changes to mayan

Hello,

Docker needs code to be packaged into images first. When you make changes to the code you need to rebuild the Docker image into your own custom Docker image and then change the image tag in your Docker Compose file to point to your custom image instead.

Refer to the official Docker documentation on how to do this: Packaging your software | Docker Documentation

Or my talk on how to package Django project for Docker here: Roberto Rosario - Dockerizing Django projects - YouTube

Mayan includes make files and templates to simplify the process, documentation here: Building the image — Mayan EDMS 4.4.2 documentation

Hello Roberto, thanks for the replay! I know about that I need to rebuild de container and re create the image if I do changes to the docker-compose.yml

What I want to do is bind the mayan folder I have locally (which has apps, urls, etc) with the one on the docker, in order for the docker to use the one I have locally (which has changes in the model, etc)

Here is my docker-compose.yml, it creates the image fine, and also the container, apparently the volumes are created fine too, but when I go to localhost:80 it wont open, y says that “the connection has been reset” but I know its a problem with the config of the volume (because the default image opened mayan-edms just fine)

version: ‘3.9’

x-mayan-container:
&mayan-container
env_file: .env
environment:
MAYAN_CELERY_BROKER_URL: amqp://${MAYAN_RABBITMQ_USER:-mayan}:${MAYAN_RABBITMQ_PASSWORD:-mayanrabbitpass}@rabbitmq:5672/${MAYAN_RABBITMQ_VHOST:-mayan}
MAYAN_CELERY_RESULT_BACKEND: redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/1
MAYAN_DATABASES: “{‘default’:{‘ENGINE’:‘django.db.backends.postgresql’,‘NAME’:’${MAYAN_DATABASE_NAME:-mayan}’,‘PASSWORD’:’${MAYAN_DATABASE_PASSWORD:-mayandbpass}’,‘USER’:’${MAYAN_DATABASE_USER:-mayan}’,‘HOST’:’${MAYAN_DATABASE_HOST:-postgresql}’}}”
MAYAN_LOCK_MANAGER_BACKEND: mayan.apps.lock_manager.backends.redis_lock.RedisLock
MAYAN_LOCK_MANAGER_BACKEND_ARGUMENTS: “{‘redis_url’:‘redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/2’}”
image: ${MAYAN_DOCKER_IMAGE_NAME:-mayanedms/mayanedms}:${MAYAN_DOCKER_IMAGE_TAG:-s4.3}
networks:
- mayan
restart: unless-stopped
volumes:
- ${MAYAN_APP_VOLUME:-app}:/var/lib/mayan
- ./my_mayan:/opt/mayan-edms/lib/python3.9/site-packages/mayan ==> this is the only change I made the rest is the same
# Optional volumes to access external data like staging or watch folders
# - /opt/staging_folder:/staging_folder
# - /opt/watch_folder:/watch_folder