Docker compose installation

From Mayan EDMS Wiki
Jump to: navigation, search

Create a docker-compose.yml file with the following content:

version: '2.1'

volumes:
    broker:
        driver: local
    app:
        driver: local
    db:
        driver: local
    results:
        driver: local

services:
  broker:
    container_name: mayan-edms-broker
    image: healthcheck/rabbitmq
    environment:
      RABBITMQ_DEFAULT_USER: mayan
      RABBITMQ_DEFAULT_PASS: mayan
      RABBITMQ_DEFAULT_VHOST: mayan
    volumes:
      - broker:/var/lib/rabbitmq
  results:
    container_name: mayan-edms-results
    image: healthcheck/redis
    volumes:
      - results:/data
  db:
    container_name: mayan-edms-db
    image: healthcheck/postgres
    environment:
      POSTGRES_DB: mayan
      POSTGRES_PASSWORD: mayan-password
      POSTGRES_USER: mayan
    volumes:
      - db:/var/lib/postgresql/data
  mayan-edms:
    container_name: mayan-edms-app
    image: mayanedms/mayanedms:latest
    depends_on:
      broker:
        condition: service_healthy
      db:
        condition: service_healthy
      results:
        condition: service_healthy
    environment:
      MAYAN_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
      MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
      MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
      MAYAN_DATABASE_HOST: db
      MAYAN_DATABASE_NAME: mayan
      MAYAN_DATABASE_PASSWORD: mayan-password
      MAYAN_DATABASE_USER: mayan
    ports:
      - "80:8000"
    volumes:
      - app:/var/lib/mayan

Execute:

docker-compose -f docker-compose.yml up -d