services:
  elk:
    image: "registry.itsm.od.ua/op-elk:1.0.1"
    networks:
    - itsm
    volumes:
    - "/opt/itsm/elk/elasticsearch:/var/lib/elasticsearch"
    restart: always
  web:
    image: "registry.itsm.od.ua/op-web:6.27.22965.19040.11"
    ports:
    - 443:443
    - 80:80
    networks:
    - itsm
    extra_hosts:
    - "${ITSM_XMPP_HOST}:${ITSM_XMPP_IP}"
    depends_on:
    - postgres
    - mail
    - ms_rebranding
    - redis
    - ms_cherga
    volumes:
    - "/opt/itsm/web/runtime:/var/www/mdm/src/protected/runtime"
    - "/opt/itsm/web/certs:/etc/nginx/certs"
    - "/opt/itsm/verdict-db:/usr/src/app/storage"
    - "itsm-web-assets:/var/www/mdm/assets"
    - type: volume
      source: "itsm-bins"
      target: /opt/itsm-bins
      volume:
        nocopy: true
    - type: volume
      source: "itsm-bin-osx-crc"
      target: /opt/itsm/bin/osx-crc
      volume:
        nocopy: true
    - type: volume
      source: "itsm-bin-win-crc"
      target: /opt/itsm/bin/win-crc
      volume:
        nocopy: true
    environment:
    - ITSM_DOMAIN
    - ITSM_SMTP_HOST
    - ITSM_SMTP_AUTH
    - ITSM_SMTP_LOGIN
    - ITSM_SMTP_PASSWORD
    - ITSM_SMTP_FROM
    - ITSM_SMTP_FROM_NAME
    - ITSM_TURN_SERVERS
    - ITSM_TURN_SECRET=itsm-turn-secret
    - ITSM_DEBUG
    - BIP_PUBLIC_SUBDOMAIN=bip
    restart: always
  redis:
    image: "redis:5.0.2"
    restart: always
    environment:
    - ALLOW_EMPTY_PASSWORD=yes
    networks:
    - itsm
    volumes:
    - "/opt/itsm/redis:/data"
  postgres:
    image: "postgres:9.6.11"
    restart: always
    environment:
      POSTGRES_PASSWORD: postgres
    volumes:
    - "/opt/itsm/postgres:/var/lib/postgresql/data"
    networks:
    - itsm
  mail:
    image: "namshi/smtp:latest"
    networks:
    - itsm
    restart: always
  rabbit:
    image: "rabbitmq:3.7.8-management"
    environment:
      RABBITMQ_DEFAULT_USER: itsm
      RABBITMQ_DEFAULT_PASS: itsm
    networks:
    - itsm
    hostname: itsm-rabbit
    restart: always
  consul:
    image: "registry.itsm.od.ua/op-consul:1.1.7"
    hostname: consul
    networks:
    - itsm
    volumes:
    - "/opt/itsm/consul/config:/consul/config"
    - "/opt/itsm/consul/data:/consul/data"
    restart: always
  mongo:
    image: "mongo:3.4.10"
    networks:
    - itsm
    volumes:
    - "/opt/itsm/mongo/data:/data/db"
    restart: always
  ms_dc:
    image: "registry.itsm.od.ua/op-ms-dc:1.2.5"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    environment:
      ITSM_SERVICE_START_DELAY: 40
    restart: always
  ms_customer:
    image: "registry.itsm.od.ua/op-ms-customer:2.1.9"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    environment:
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
      ITSM_SERVICE_START_DELAY: 40
    restart: always
  ms_company:
    image: "registry.itsm.od.ua/op-ms-company:2.0.5"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - postgres
    environment:
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
      ITSM_SERVICE_START_DELAY: 40
    restart: always
  ms_device:
    image: "registry.itsm.od.ua/op-ms-device:2.0.6"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - postgres
    environment:
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
      ITSM_SERVICE_START_DELAY: 40
    restart: always
  ms_fr:
    image: "registry.itsm.od.ua/op-ms-fr:1.3.1"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - mongo
    environment:
      ITSM_SERVICE_START_DELAY: 40
    volumes:
    - "/opt/itsm/verdict-db:/usr/src/app/storage"
    restart: always
  ms_fr_ui:
    image: "registry.itsm.od.ua/op-ms-fr-ui:2.1.29"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    environment:
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
    restart: always
  ms_fr_tasker:
    image: "registry.itsm.od.ua/op-ms-fr-tasker:1.1.0"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - mongo
    restart: always
  ms_audit_log:
    image: "registry.itsm.od.ua/op-ms-al:1.5.16"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - elk
    environment:
      ITSM_SERVICE_START_DELAY: 40
      ITSM_CONSUL_URI: "http://consul:8500"
    restart: always
  ms_audit_log_tasker:
    image: "registry.itsm.od.ua/op-ms-al-tasker:1.1.1"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - elk
    restart: always
  ms_global_file_event:
    image: "registry.itsm.od.ua/op-ms-gfe:2.3.18"
    environment:
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
    networks:
    - itsm
    depends_on:
    - rabbit
    - consul
    - mongo
    restart: always
  bin_all:
    image: "registry.itsm.od.ua/op-bin-all:1.0.190221"
    volumes:
    - "itsm-bins:/opt/volume"
  ms_reports_csv:
    image: "registry.itsm.od.ua/op-ms-report:1.2.5"
    volumes:
    - "itsm-web-assets:/var/downloads"
    networks:
    - itsm
    depends_on:
    - consul
    - rabbit
    - web
    extra_hosts:
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
    environment:
      ITSM_ENV: itsm
      ITSM_CONFIG_MANAGER: consul
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_DOMAIN: ${ITSM_DOMAIN}
      ITSM_WEB_IP: ${ITSM_WEB_IP}
      ITSM_SERVICE_START_DELAY: 40
    entrypoint: /on-premise-bootstrap.sh
    restart: always
  ms_rebranding:
    image: "registry.itsm.od.ua/op-rcc-gen:1.0.11"
    networks:
    - itsm
    restart: always
  ms_rmm_collector:
    image: "registry.itsm.od.ua/op-ms-rmm-collector:0.2.4"
    networks:
    - itsm
    environment:
      ITSM_SERVICE_START_DELAY: 40
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
    restart: always
    extra_hosts:
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
  ms_rmm_collector_ui:
    image: "registry.itsm.od.ua/op-ms-rmm-collector-ui:1.0.1"
    networks:
    - itsm
    environment:
      ITSM_SERVICE_START_DELAY: 40
      ITSM_LOG_STDOUT_DISABLED: "true"
      ITSM_LOG_INTERNAL_ENABLED: "true"
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
    extra_hosts:
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
    restart: always
  ms_rmm_searcher:
    image: "registry.itsm.od.ua/op-ms-rmm-searcher:0.1.3"
    networks:
    - itsm
    environment:
      ITSM_SERVICE_START_DELAY: 40
      ITSM_LOG_STDOUT_DISABLED: "true"
      ITSM_LOG_INTERNAL_ENABLED: "true"
      ITSM_ENV: "itsm"
      ITSM_CONSUL_URI: "http://consul:8500"
    restart: always
  ms_auth_cached_proxy:
    image: "registry.itsm.od.ua/op-ms-auth-cached-proxy:1.1.9"
    networks:
    - itsm
    depends_on:
    - web
    environment:
      ITSM_ENV: itsm
      ITSM_DOMAIN: ${ITSM_DOMAIN}
    entrypoint: /on-premise-bootstrap.sh
    restart: always
  ms_rtdc_api:
    image: "registry.itsm.od.ua/op-ms-rtdc-api:1.12.79"
    networks:
    - itsm
    depends_on:
    - redis
    environment:
      ITSM_ENV: itsm
      ITSM_DOMAIN: ${ITSM_DOMAIN}
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_MS_NODE_ID: "01"
      ITSM_CA_CERT_PATH:
    extra_hosts:
    - "${ITSM_XMPP_HOST}:${ITSM_XMPP_IP}"
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
    entrypoint: "/bin/bash /on-premise-bootstrap.sh"
    restart: always
    volumes:
    - "/opt/itsm/rtdc-api/certs:/opt/certs"
  ms_rtdc_relay:
    image: "registry.itsm.od.ua/op-ms-rtdc-relay:2.0.41"
    networks:
    - itsm
    depends_on:
    - redis
    environment:
      ITSM_ENV: itsm
      ITSM_DOMAIN: ${ITSM_DOMAIN}
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_MS_NODE_ID: "01"
    extra_hosts:
    - "${ITSM_XMPP_HOST}:${ITSM_XMPP_IP}"
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
    entrypoint: "/bin/bash /on-premise-bootstrap.sh"
    restart: always
  ms_bip:
    image: "registry.itsm.od.ua/op-ms-bip:1.4.11"
    networks:
    - itsm
    depends_on:
    - consul
    - mongo
    environment:
      ITSM_ENV: itsm
      ITSM_DOMAIN: ${ITSM_DOMAIN}
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_SERVICE_START_DELAY: 40
      BIP_PUBLIC_SUBDOMAIN: "bip"
      BIP_PUBLIC_SCHEME: "https"
    entrypoint: "/on-premise-bootstrap.sh"
    restart: always
    volumes:
    - type: volume
      source: "itsm-bins"
      target: /opt/mounted
      volume:
        nocopy: true
  ms_cherga:
    image: "registry.itsm.od.ua/op-ms-cherga:1.4.1"
    networks:
    - itsm
    environment:
      ITSM_ENV: itsm
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_DOMAIN: ${ITSM_DOMAIN}
    restart: always
    extra_hosts:
    - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
  ms_tasker:
    image: "registry.itsm.od.ua/op-ms-tasker:1.1.3"
    networks:
    - itsm
    environment:
      ITSM_ENV: itsm
      ITSM_CONSUL_URI: http://consul:8500
      ITSM_DOMAIN: ${ITSM_DOMAIN}
    restart: always
  bin_win_crc:
    image: "registry.itsm.od.ua/op-bin-win-crc:6.25.21821.19010"
    volumes:
    - "itsm-bin-win-crc:/opt/binaries"
  bin_osx_crc:
    image: "registry.itsm.od.ua/op-bin-osx-crc:6.25.21822.19010"
    volumes:
    - "itsm-bin-osx-crc:/opt/binaries"
networks:
  itsm:

volumes:
  itsm-web-assets:
  itsm-bins:
  itsm-bin-win-crc:
  itsm-bin-osx-crc:

