version: "3"
services:
  app:
    build:
      context: .
      dockerfile: ./apps/app/Dockerfile
    restart: always
    container_name: app
    ports:
    - 3001:80
    networks:
    - myNetwork
  converter:
    build:
      context: .
      dockerfile: ./apps/converter/Dockerfile
    restart: always
    container_name: converter
    volumes:
    - .env:/opt/app/.env
    depends_on:
    - rmq
    networks:
    - myNetwork
  api:
    build:
      context: .
      dockerfile: ./apps/api/Dockerfile
    restart: always
    container_name: api
    volumes:
    - .env:/opt/app/.env
    ports:
    - 3002:3000
    networks:
    - myNetwork
    depends_on:
    - rmq
  rmq:
    image: rabbitmq:3-management
    restart: always
    networks:
    - myNetwork
    environment:
    - RABBITMQ_DEFAULT_USER=admin
    - RABBITMQ_DEFAULT_PASS=admin

networks:
  myNetwork:
    driver: bridge