version: '3'
services:
  mistral-api:
    build:
      context: ../../..
      dockerfile: tools/docker/Dockerfile
      args:
        BUILD_TEST_DEPENDENCIES: "false"
    restart: always
    ports:
      - "8989:8989"
    networks:
      database:
      message-broker:
      identity-provider:
      cloud-flow:
        aliases:
         - mistral
    env_file:
     - mistral.env
#    volumes:
#      - "/path/to/mistral.conf:/etc/mistral/mistral.conf"
    environment:
      - MISTRAL_SERVER=api
      - UPGRADE_DB=true

  mistral-engine:
    build:
      context: ../../..
      dockerfile: tools/docker/Dockerfile
      args:
        BUILD_TEST_DEPENDENCIES: "false"
    restart: always
    networks:
      - database
      - identity-provider
      - message-broker
    env_file:
     - mistral.env
#    volumes:
#      - "/path/to/mistral.conf:/etc/mistral/mistral.conf"
    environment:
      - MISTRAL_SERVER=engine

  mistral-executor:
    build:
      context: ../../..
      dockerfile: tools/docker/Dockerfile
      args:
        BUILD_TEST_DEPENDENCIES: "false"
    restart: always
    networks:
      - message-broker
      - identity-provider
    env_file:
     - mistral.env
#    volumes:
#      - "/path/to/mistral.conf:/etc/mistral/mistral.conf"
    environment:
      - MISTRAL_SERVER=executor

  mistral-event-engine:
    build:
      context: ../../..
      dockerfile: tools/docker/Dockerfile
      args:
        BUILD_TEST_DEPENDENCIES: "false"
    restart: always
    networks:
      - database
      - message-broker
      - identity-provider
    env_file:
     - mistral.env
#    volumes:
#      - "/path/to/mistral.conf:/etc/mistral/mistral.conf"
    environment:
      - MISTRAL_SERVER=event-engine

  mistral-notifier:
    build:
      context: ../../..
      dockerfile: tools/docker/Dockerfile
      args:
        BUILD_TEST_DEPENDENCIES: "false"
    restart: always
    networks:
      - database
      - message-broker
      - identity-provider
    env_file:
     - mistral.env
#    volumes:
#      - "/path/to/mistral.conf:/etc/mistral/mistral.conf"
    environment:
      - MISTRAL_SERVER=notifier
