Docker Compose installation

  1. Install Docker:

    wget -qO- https://get.docker.com/ | sh
    

    If you don’t want to run an automated script, follow the instructions outlined in their documentation: https://docs.docker.com/install/

  2. Install Docker Compose:

    Follow the instructions as: https://docs.docker.com/compose/install/

    For GNU/Linux based operating systems, this is usually:

    sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
    sudo chmod +x /usr/local/bin/docker-compose
    

    Verify Docker Compose is working with:

    docker-compose -v
    
  3. Download the Mayan EDMS Docker Compose file:

    The file is located at: https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/docker-compose.yml

    curl https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/docker-compose.yml -O
    
  4. Update the Mayan EDMS Docker Compose file:

    Update the docker-compose.yml file directly or create a file named .env in the same folder where the file docker-compose.yml resides. Add an entry for each of the environment variables to change.

    Note

    If you are upgrading from a previous installation that used the deployment script at https://get.mayan-edms.com or the Simple Docker installation method, you need to create the .env file with at least these three lines. These will let the new Docker Compose deployment use the existing data volumes of the previous installation:

    MAYAN_APP_VOLUME=/docker-volumes/mayan-edms/media
    MAYAN_REDIS_VOLUME=/docker-volumes/mayan-edms/redis
    MAYAN_POSTGRES_VOLUME=/docker-volumes/mayan-edms/postgres
    

    Note

    If the .env file is does not reside in the same folder where the docker-compose.yml is or you choose another filename for it, the option --env-file <you env file path> needs to be added to every docker-compose invocation.

  5. Verify the configuration changes:

    docker-compose --file docker-compose.yml --project-name mayan config
    

    This command will output the Docker Compose file, using the values of your .env file.

  6. Launch the Mayan EDMS Docker Compose containers:

    Note

    If you are invoking the docker-compose command in the same directory where the file docker-compose.yml resides, there is no need to add the --file docker-compose.yml option.

    docker-compose --file docker-compose.yml --project-name mayan up --detach
    

    Note

    There is no need to restart the containers after a shutdown, the containers in the Docker Compose file are set to start automatically.

Additional commands

  • To view the logs of the containers:

    docker-compose --file docker-compose.yml --project-name mayan logs
    
  • To list the containers:

    docker-compose --file docker-compose.yml --project-name mayan ps --all
    
  • To terminate the containers:

    Note

    Once terminated, the containers are removed and only the data volumes remain.

    docker-compose --file docker-compose.yml --project-name mayan down