version: '3.8'
services:
  rabbitmq__local:
    image: rabbitmq:management
    restart: unless-stopped
    ports:
      - "5672:5672"
      # - "15672:15672" # Admin web console
    expose:
      - "5672"
    container_name: rmq

  soar_bus:
    build:
      context: ..
      dockerfile: docker/Dockerfile
    restart: unless-stopped
    depends_on:
      - rabbitmq__local
    environment:
      - MQ_HOST=rmq
    volumes:
      - ../:/app
    command: "python soar_bus.py"
    container_name: soar_bus

  soar_api:
    build:
      context: ..
      dockerfile: docker/Dockerfile
    restart: unless-stopped
    ports:
      - "8087:8087"
    expose:
      - "8087"
    depends_on:
      - rabbitmq__local
    environment:
      - MQ_HOST=rmq
      - FLASK_HOST=0.0.0.0
    volumes:
      - ../:/app
    command: "python api.py"
    container_name: soar_api