services:

  app:
    build:
      context: .docker/app
    container_name: app-omnibusiness
    volumes:
      - ./:/var/www/html/omnibusiness
    networks:
      - omnibusiness-network

  nginx:
    build:
      context: .docker/nginx
    container_name: nginx-omnibusiness
    volumes:
      - ./:/var/www/html/omnibusiness
    ports:
      - "9000:80"
    networks:
      - omnibusiness-network

  mongodb:
    image: mongo:7.0.14
    container_name: mongodb-omnibusiness
    volumes:
      - .data/mongodb:/data/db
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: password
      MONGO_INITDB_DATABASE: omnibusiness
    ports:
      - "27017:27017"
    networks:
      - omnibusiness-network

  rabbitmq:
    image: rabbitmq:4.0.2-management-alpine
    hostname: "rabbitmq"
    container_name: rabbitmq-omnibusiness
    ports:
        - 5672:5672
        - 15672:15672
    volumes:
        - .data/rabbitmq/data/:/var/lib/rabbitmq/
        - .data/rabbitmq/log/:/var/log/rabbitmq
    environment:
        - RABBITMQ_DEFAULT_USER=guest
        - RABBITMQ_DEFAULT_PASS=guest
    networks:
        - omnibusiness-network

networks:
  omnibusiness-network:
    driver: bridge
