version: "3.5"
services:
  postgres:
    image: postgres:11-alpine
    container_name: postgresmultirepo
    hostname: postgresmultirepo
    environment:
      - POSTGRES_USER=nuxeoAdmin
      - POSTGRES_PASSWORD=nuxeoAdmin
    command: ["-c", "shared_buffers=256MB", "-c", "effective_cache_size=1GB", "-c", "work_mem=10MB", "-c", "wal_buffers=16MB", "-c", "full_page_writes=off"]
    ports:
      - "5432:5432"
    volumes:
      - ./postgres/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
      - ./postgres/data:/var/lib/postgresql/data:rw
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.16.1
    container_name: elasticmultirepo
    hostname: elasticmultirepo
    environment:
      discovery.type: single-node
      ES_JAVA_OPTS: -Xms384m -Xmx384m
    ports:
      - "9200:9200"
    volumes:
      - ./elastic/data:/usr/share/elasticsearch/data:rw
  redis:
    image: redis:5.0-alpine
    container_name: redismultirepo
    hostname: redismultirepo
    ports:
      - "6379:6379"
    volumes:
      - /tmp/my-nuxeo-env2/data/redis:/data:rw
