services:
  app:
    image: laravel:latest
    ports:
      - "8000:8000"
    build:
      context: .
      dockerfile: Dockerfile
    command: php-fpm
    container_name: laravel_app
    volumes:
      - .:/var/www/html
    networks:
      - laravel_network

  webserver:
    image: nginx:latest
    container_name: nginx
    ports:
      - "80:80"
    volumes:
      - .:/var/www/html
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
    networks:
      - laravel_network

  mysql:
    image: mysql:5.7
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: laravel
      MYSQL_USER: laravel
      MYSQL_PASSWORD: password
    volumes:
      - db_data:/var/lib/mysql
    networks:
      - laravel_network

  rabbitmq:
    image: rabbitmq:management
    container_name: rabbitmq
    ports:
      - "5672:5672"
      - "15672:15672" # RabbitMQ Management UI
    networks:
      - laravel_network

  s3ninja:
    image: kcomlabs/s3ninja  # Updated image name
    container_name: s3ninja
    ports:
       - "9444:9444"
    networks:
      - laravel_network

networks:
  laravel_network:

volumes:
  db_data:
