version: "3.7"
services:
  g4du_apigateway:
    image: g4du_apigateway:latest
    hostname: g4du.itechmission.org
    ports:
      - "8045:80"
    volumes:
      - /var/www/g4du/uploadData/:/var/www/deewar/containerdata
      - /var/www/g4du/downloadPrimaryData/:/var/www/deewar/downloadPrimaryData/
      - /var/www/g4du/downloads/:/var/www/deewar/downloads/
      - /var/www/g4du/exportData/:/var/www/deewar/exportData/

  g4du_rabbitmq:
    image: rabbitmq:3-management
    restart: always
    hostname: "mrabbit"
    ports:
      - "8048:5672"
      - "8049:15672"
    volumes:
      - /var/www/g4du/rabbitmq/rabbitmq_data:/var/lib/rabbitmq
      - /var/www/g4du/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
    environment:
        RABBITMQ_CONFIG_FILE: /etc/rabbitmq/rabbitmq.conf

  g4du_dataimport:
    image: www.partnershipsforthegoals.org:8099/g4du/dataimport:staging
    hostname: g4du.itechmission.org
    restart: always
    depends_on:
      - g4du_rabbitmq  # Wait for g4du_rabbitmq to be ready before starting g4du_dataimport
    ports:
      - "8046:8046"
    volumes:
       - /var/www/g4du/uploadData/:/var/uploadData
       - /var/www/g4du/logs/:/var/importLog
       - /var/www/g4du/resourceUploads/:/var/resourceUploads
       - /var/www/g4du/participantUploads/:/var/participantUploads
       - /var/www/g4du/downloads/:/var/downloads
       - /var/www/g4du/constantFile/:/var/constantFile
       - /var/www/g4du/exportData/:/var/exportData/



  g4du_datasupplier:
    image: www.partnershipsforthegoals.org:8099/g4du/datasupplier:staging
    hostname: g4du.itechmission.org
    restart: always
    ports:
      - "8047:8047"
    volumes:
       - /var/www/g4du/logs/:/var/importLog
       - /var/www/g4du/downloads/:/var/downloads
       - /var/www/g4du/constantFile/:/var/constantFile
       - /var/www/g4du/new_datasets/:/var/primaryDataFolder/
       - /var/www/g4du/exportData/:/var/exportData/

networks:
  default:

#Volumes
volumes:
  uploadData:
    driver: local
