version: '2.4'
services:
  minio:
    image: ${CI_REGISTRY}/mattermost/ci/images/minio:RELEASE.2019-10-11T00-38-09Z-1
    command: "server /data"
    environment:
      MINIO_ACCESS_KEY: minioaccesskey
      MINIO_SECRET_KEY: miniosecretkey
      MINIO_SSE_MASTER_KEY: "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574"
  inbucket:
    image: ${CI_REGISTRY}/mattermost/ci/images/inbucket:v3.0.0-rc1-2-gc64e7a6-1
    restart: always
    environment:
      INBUCKET_WEB_ADDR: "0.0.0.0:9001"
      INBUCKET_POP3_ADDR: "0.0.0.0:10110"
      INBUCKET_SMTP_ADDR: "0.0.0.0:10025"
  openldap:
    image: ${CI_REGISTRY}/mattermost/ci/images/openldap:1.4.0-1
    restart: always
    environment:
      LDAP_TLS_VERIFY_CLIENT: "never"
      LDAP_ORGANISATION: "Mattermost Test"
      LDAP_DOMAIN: "mm.test.com"
      LDAP_ADMIN_PASSWORD: "mostest"
  elasticsearch:
    image: ${CI_REGISTRY}/mattermost/ci/images/mattermost-elasticsearch-docker:7.17.3
    environment:
      http.host: "0.0.0.0"
      http.port: 9200
      http.cors.enabled: "true"
      http.cors.allow-origin: "http://localhost:1358,http://127.0.0.1:1358"
      http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization"
      http.cors.allow-credentials: "true"
      transport.host: "127.0.0.1"
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
  dejavu:
    image: ${CI_REGISTRY}/mattermost/ci/images/dejavu:3.4.2-1
  keycloak:
    image: ${CI_REGISTRY}/mattermost/ci/images/keycloak:10.0.2-1
    restart: always
    environment:
      KEYCLOAK_USER: mmuser
      KEYCLOAK_PASSWORD: mostest
      DB_VENDOR: h2
      KEYCLOAK_IMPORT: /setup/realm.json
    volumes:
     - "./docker/keycloak:/setup"
  prometheus:
    image: ${CI_REGISTRY}/mattermost/ci/images/prometheus:2.27.1-1
    volumes:
      - "./docker/prometheus-linux.yml:/etc/prometheus/prometheus.yml"
  grafana:
    image: ${CI_REGISTRY}/mattermost/ci/images/grafana:8.0.1-1
    volumes:
     - "./docker/grafana/grafana.ini:/etc/grafana/grafana.ini"
     - "./docker/grafana/provisioning:/etc/grafana/provisioning"
     - "./docker/grafana/dashboards:/var/lib/grafana/dashboards"
